RegularExpressionValidator not firing on white-space entry

前端 未结 5 1368
说谎
说谎 2020-12-07 01:54

I want to validate string containing only numbers. Easy validation? I added RegularExpressionValidator, with ValidationExpression=\"/d+\".

Looks okay - but nothing

5条回答
  •  情书的邮戳
    2020-12-07 02:44

    Your question is a little hard to follow, but if you are asking how to write a regular expresion which only accepts digits I think your mistake is in using forward-slash instead of backslash. Try

    "\d+"

提交回复
热议问题