Validate textbox it should contains atleast 20 characters

Posted by Venkat | Labels:

Here we have to discuss the validation of the field , the textbox should contain atleast 20 Characters


ValidationExpression=^.{20,1999}$ - >

This expression should accept atleast 20 charactes and maximum of 1999 - it does not accept less than 20 characters

If I assumed that you want to enter only alphabets ie a-z into your textbox for which the validation expression is:

ValidationExpression="^\D{20,}$"

For having both alphabets and digits expression:

ValidationExpression="^[a-z0-9]{20,}$"

Your expression below will allow all alphabets, digits as well as special chars as #, $ etc to be entered incase thats what you want:

ValidationExpression="^.{20,1999}$"

PayOffers.in