Using the DateValidator to validate a single source input : TextInput Validation « Components « Flex






Using the DateValidator to validate a single source input

Using the DateValidator to validate a single source input
        
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:DateValidator source="{birthday}" 
                      property="text"
                      inputFormat="mm/dd/yyyy" 
                      allowedFormatChars="/"
                      trigger="{submitButton}" 
                      triggerEvent="click" />
    
    <mx:Text text="Enter your birth date:" />
    
    <mx:TextInput id="birthday" />
    
    <mx:Button label="Submit" id="submitButton" />
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use validator for TextInput fieldsUse validator for TextInput fields
2.Validate a form made up of several TextInput controlsValidate a form made up of several TextInput controls
3.TextInput invalid and valid eventTextInput invalid and valid event