regex - 8-20 characters, but no spaces allowed anywhere in HTML5 validation -


i trying restrict space entry in html5 validation. tried with

^[a-za-z0-9\*\!\\?\(\)]{8,20}$ 

and

^[^-\s]{8,20}$. 

problem restricting @ if try space. if after space enter other space allows space @ starting also.

i want no white space should allowed.

you may try ^\s{8,20}$ 8 20 non whitespace char.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -