Can some one help me out, I need to allow the apostrophe ( ' ) in the
email address and need to write RegExp for this case. The RegExp below
allows apostrophe but also allows other special characters like &, ",
etc., how can i modify the below RegExp to allow only apostrophe.

public class CustomEmailValidator extends EmailValidator
        {
                public static var _results:Array=[];
                private var _errorMsg:String="";

                override protected function doValidation(value:Object):Array
                {
                        _results=[];
                        _errorMsg="";
                var 
email_pattern:RegExp=/([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-
zA-Z]+[.])+[a-zA-Z]2,6}/;

                        if (!value.match(email_pattern))
                        {
                                _results=super.doValidation(value);

                        }

                        return _results;

                }
        }

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to