gilbertsavier Posted July 9, 2009 Report Share Posted July 9, 2009 Hi Everyone,I got a problem with the Regular Expression Validation of custom fields. I have set the following regular expression in a custom text input field:^[A-Za-z0-9._\-]+@{1,1}[A-Za-z0-9._\-]+\.[A-Za-z]{2,3}$When I submit a ticket and fill in 'test@test.com' in this custom field I get the following error for the field:'One of the required field(s) is empty'I tested the same expression in a simple php script with the ereg function and it works without a problem. Anyone knows what the problem is? Link to comment Share on other sites More sharing options...
jeffman Posted July 9, 2009 Report Share Posted July 9, 2009 The following works just fine: re = /^[A-Za-z0-9._\-]+@{1,1}[A-Za-z0-9._\-]+\.[A-Za-z]{2,3}$/;str = "test@test.com";str.match(re) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now