The SocialSecurityValidator class is used for validate a string Which has a valid United States Social Security Number or not.
The SocialSecurityValidator class is used for validate a string Which has a valid United States Social Security Number or not.The SocialSecurityValidator class is used for validate a
string Which has a valid United States Social Security Number or not. This
validator does not check if the number is an existing Social Security Number.
The tag of SocialSecurityNumber <mx:SocialSecurityNumber>.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <fx:Script> <![CDATA[ import mx.controls.Alert; ]]> </fx:Script> <fx:Declarations> <fx:Model id="CheckssecNumber"> <ssnumberInfo> <SecurityNumber>{txt.text}</SecurityNumber> </ssnumberInfo> </fx:Model> <mx:SocialSecurityValidator source="{txt}" property="text" trigger="{btn}" triggerEvent="click" valid="Alert.show('Validation Successful');"/> </fx:Declarations> <s:Panel title="SocialSecurityValidator Example" width="650"> <mx:Form height="94" width="648" backgroundColor="#101446" color="#FFFFFF"> <mx:FormItem label="Enter Social Security number: "> <s:TextInput id="txt" width="100%" color="#000000"/> </mx:FormItem> <mx:FormItem > <s:Button id="btn" label="Check Validation" chromeColor="#5F1B0C"/> </mx:FormItem> </mx:Form> </s:Panel> </s:Application> |