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

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -