Skip to content

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

Merged
merged 1 commit into from
Oct 21, 2015

Conversation

staabm
Copy link
Member

@staabm staabm commented Jul 21, 2015

Includes a example which shows how to make built-in email validation use
a custom email regular expression pattern.

<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 );
Copy link
Collaborator

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.

@jzaefferer
Copy link
Collaborator

There needs to be a link to this page somewhere on the site. At least on pages/documentation.md.

@staabm staabm force-pushed the methods branch 2 times, most recently from bbdb572 to 9427765 Compare July 21, 2015 11:44
@staabm
Copy link
Member Author

staabm commented Jul 21, 2015

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>
Copy link
Collaborator

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.

@jzaefferer
Copy link
Collaborator

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 "draw_white_space": "all", and "trim_trailing_white_space_on_save": true,.

@staabm
Copy link
Member Author

staabm commented Jul 21, 2015

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.
staabm added a commit that referenced this pull request Oct 21, 2015
Entries: Promote jQuery.validator.methods property as public api
@staabm staabm merged commit e6cbcff into jquery-validation:master Oct 21, 2015
@staabm staabm deleted the methods branch October 21, 2015 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants