Posted By: Anonymous
I’m using Polymer 1.0 with the paper-input’s “pattern” parameter.
I need the field to require any character (not white space)
White space is optional
^[-_a-zA-Z0-9]+(s+[-_a-zA-Z0-9]+)*$ from this answer does just that, except disallows white space in the beginning and end, and disallows non-letter and number characters. I would like to allow white space in the beginning and end.
After receiving the answer
s*[S]+(s+[S]+)*s* works perfectly because it allows any characters including special characters.
s* right after the
^ and also before the
This will allow zero-or-more spaces before the first character and after the last one.