In a profile text, I want to add a regex, that makes sure users input atleat 50 characters -


i want users able enter profile text, spaces ( have added space) allows commas , dots.
if user has comma in text, gets error.
have used this:

 /^[a-za-z0-9 ]{50,}+$/ 

thanks.

you can try regex:

/^[a-za-z0-9\s,.]{50,}$/ 

adding , , . allows , , . well. \s allows space.
{50,} makes sure input @ least 50 characters.


Comments

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -

thumbnails - jQuery image rotate on hover -