Click here to Skip to main content
16,008,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Having multiline text box on my aspx page through that i am update case status of multiple case id. e.g case id like 1508,1509 are valid case id.(case id are comma,semicolon or any other separator value)range of case id from 1 to 6 digits only.
if some one put invalid case id like 111111 so it gives proper validation message & accepts only 1 to 6 digits case id value with comma separated or any other separator configurable from web.config
Posted

Use a regex:
\d{1,6},\d{1,6}
That matches 1 to 6 digits, followed by a comma, followed by 1 to 6 digits.
 
Share this answer
 
You need to write regular expression for customized validations. Or can you use a listbox with predefined entries?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900