Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Regular expression validator restricting a comma

$
0
0

This should be easy, but I can't get it to work.  I want an expression validator to make the page invalid when a comma is used in the text box that the control validates.  I have tried [^,]* as the validator expression.  Also [^,].  Also, ^[|a-zA-Z]{1,50}$

I am using the Validation Group etc.  This works for restricting a non-email entry in the text box.  But adding comma's totally changes reading the the comma deliminator string.

This is in Asp.Net.  I know that I could use the replace function, but that only works without the comma delimitor.

Any ideas would be greatly appreciated.


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>