asp.net - RegularExpressionValidator to limit input length and allow empty strings -


i'm bad regex , looking @ question identical can't work need.

i use regularexpressionvalidator allow character 255 characters or nothing @ all. tried,

validateexpression="^.{255}$"  

but throws unhanded exception when textbox i'm checking empty.

i've tried

validateexpression="^.{,255}$" 

thank rodney

did try ^.{0,255}$? not sure exception getting though.

edit: also, if struggling .net regex, regex hero tester great help. know there other sites, 1 far best, if ask me.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

amazon web services - Installing MobileFirst 7.0 server on AWS -

Non Unique Username with ASP.Net Identity 2.0 -