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
Post a Comment