Sandip Bhogal Posted October 30 Posted October 30 Say if i have a user form with Multi Text field - is there possibility on limiting lines? So the person who fills in the form cannot exceed more than 2 lines, if so, what would be the regex validation? Also would like to know, what would be the regex validation for inputting numbers only? We dont want users to input letters in single text field. Would appreciate your support. Kind regards Sandip
Steve Giller Posted October 30 Posted October 30 For numbers only you can use ^\d*$ I'm not sure about the 2 line limit. 1
Sandip Bhogal Posted October 30 Author Posted October 30 Hi Steve, Thanks for getting back and that's very useful to know. Is there a way of restricting it to 2 digits only? If that's possible, what would be the regex?
Steve Giller Posted October 30 Posted October 30 For 2 digits at most (including just leaving it blank) I think (please check this) that it's ^\d{0-2}$ And for 2 digits exactly ^\d{2}$
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now