The validation I need is the following
A-Z, a-z, 0-9, no trailing/leading whitespace, -._ only once non-trailing/leading
Till now I have the following:
<input type="text" pattern="^\S[a-zA-Z0-9]*\S$">
This takes care of the leading trailing whitespace and A-Z,a-z,0-9, but it needs minimum 2 characters
Then I thought of something like this for the symbols -._
<input type="text" pattern="^\S[a-zA-Z0-9]*[\-_+]{,1}\S$">
But no luck there. Any ideas?