Hi . .
Today am learned something about the Validation error .It is used to display the error messages.You can customize the look of the component and the error message associated with the error...
* If a validation error occurs, by default Flex draws a red box around the component associated with the failure.
* If the user moves the mouse pointer over the component, Flex displays the error message associated with the error.
Working with Validation Error
Subclasses of the UIComponent base class, which include the Flex user-interface components, generally handle validation failures by changing their border color and displaying an error message. When validation succeeds, components hide any existing validation error message and remove any border.
Sample code
mx:PhoneNumberValidator
id="pnV"
source="{phoneInput}"
property="text"
wrongLengthError="Please enter a 10-digit number."/> mx:TextInput id="phoneInput"
mx:TextInput id="zipCodeInput"
In the above code,I am used the controls like Textinput,to get the string.PhoneNumberValidator is used for validate the entered data in textinput.If wrongly enter the dight means it displays the error,which is given in the wronglength error.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment