RSS

devexpress TextEdit: Automatic validation

16 Dec

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:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: