Author: Animosity | Posted on: 9/2/2008 9:14:17 AM | Views : 292

 I have a phone control and have a base RE for it as follows
^([0-9,_]{1,3}[\-][0-9,_]{1,3}[\-][0-9,_]{1,4})$
 
Now, when it's displayed in my form it works and looks perfect. ___-___-____  However, the problem I am having is, in the form it's showing underscores and hyphens as it's suppose to but it's saving these in the database when it shouldn't. I wrote in a replace to strip the hyphens and underscores and it works but now in my database with no number entered in it will just created a record with a new ID and blank in the numberfield. I guess I am basicly looking for a way for on focus the user would get ___-___-____ and extention box _____ 5 numbers and on lost focus it just has a plain text box with nothing but my watermark in it. THis way it will see nothing in the text box, including the expression's ___- and will not add a record to the database.
 
 
Any help would be appreciated. 

Go to the complete details ...