-
Notifications
You must be signed in to change notification settings - Fork 30
Entries: Promote jQuery.validator.methods property as public api #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
<desc>Sets a custom email pattern for the built-in email validation rule.</desc> | ||
<code><![CDATA[ | ||
$.validator.methods.email = function( value, element ) { | ||
return this.optional( element ) || /whatEverRegexILike/.test( value ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be an actual email regex, though a very simple one.
There needs to be a link to this page somewhere on the site. At least on |
bbdb572
to
9427765
Compare
adjusted per feedback. |
@@ -5,6 +5,7 @@ | |||
<longdesc> | |||
Return true if the value is a valid email address. | |||
<p>Works with text inputs.</p> | |||
<p>In case you need a custom email pattern use the <a href="/jQuery.validator.methods/">$.validator.methods property</a>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the indent, mixing spaces and tabs here. Also in the next diff.
Thanks for the updates. Content looks good, issues should be easy enough to address. I recommend adjusting your editor to show indent/whitespace by default and removing trailing whitespace on save. Dunno what you use, in Sublime Text its |
sorry for the ugly whitespaces... usually I am using Zend Studio which resolves such issues, but I made this changes using Notepad++ .. will try if it is configurable in Notepad++ |
Includes a example which shows how to make built-in email validation use a custom email regular expression pattern.
Entries: Promote jQuery.validator.methods property as public api
Includes a example which shows how to make built-in email validation use
a custom email regular expression pattern.