I want to create a TextBox for decimal digits with this pattern:
1/23
12/34
12/323
The integer part is less than 2 and the double part is less than 3.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You probably want a regular expression. Something like:
This should return true if the whole part of the number being 1 to 2 digits in length and the decimal part is optional, but if present should be no greater than 3 digits in length.
Or if the decimal part isn’t optional:
(The “133/33” is an example number as a string)