RSS

Monthly Archives: December 2013

devexpress TextEdit: Automatic validation


if you want to validate E-mail runtime using devexpress TextEdit control. you use this mask for both web & winform.

 

Mask : [a-zA-Z0-9.-]+@[a-zA-Z0-9-]+\.[A-Za-z]{2,6}

I have added a Textbox like this:
<dxe:TextEdit EditValue=”{Binding Email}” MaskType=”RegEx” Mask=”[a-zA-Z0-9.-]+@[a-zA-Z0-9-]+\.[A-Za-z]{2,6}” />

As you can see it is using a regex to validate email adresses.
The mask is very nice, however i can easily tab out of the field resulting in invalid data being bound to my model.

Shouldnt it automatically Validate the mask on losing focus

 

Email Validate

 

Advertisements
 
Leave a comment

Posted by on December 16, 2013 in WinForm

 

Tags: