asp.net mvc - C# regular expression format -


i want allow following 3 digit strings accepted: 083, 084, 085, 086, 087, 088 or 089

at moment i'm using:

[regularexpression("^08\\{1}$", errormessage = "please enter valid 3 digit area code")] 

but accepts 081 , 082

i've tried using:

[regularexpression("^08\\[3-9]{1}$", errormessage = "please enter valid 3 digit area code")] 

but it's not working me

the regex should

[regularexpression("^08[3-9]$", errormessage = "please enter valid 3 digit area code")] 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -