-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Addition Methods: New method nisBr (#2196) #2203
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
Addition Methods: New method nisBr (#2196) #2203
Conversation
Fixes new implementation Fixes jquery-validation#2169
File commited wrong
Fixes new implementation Fixes jquery-validation#2196
…validation into nis-br-method
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.
Hi @csmendonca,
Thanks a lot for your contribution :)
Overall, it looks good to me. I only have three changes to be made, and after that I will merge.
*/ | ||
|
||
$.validator.addMethod( "nisBR", function( 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.
Please remove this empty line.
* @Description Brazillian PIS or NIS number (Número de Identificação Social Pis ou Pasep) is the equivalent of a | ||
* Brazilian tax registration number NIS of PIS numbers have 11 digits in total: 10 numbers followed by 1 check numbers | ||
* that are being used for validation. | ||
* @copyright (c) 25/10/2016 22:40, Cleiton da Silva Mendonça |
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.
I think this is a copy-paste error. Can you please adjust the date to the right one.
//Get check number of value | ||
cn = parseInt( value.substring( 10, 11 ), 10 ); | ||
|
||
//Get number with 10 digits of the 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.
Please add a space before this comment and the one above it in order to be consistent with the rest of the comments.
Rewrite with reviews some mistakes Fixes jquery-validation#2203
Hi @Arkini, Thanks for your attention. |
Rewrite with reviews some mistakes Fixes jquery-validation#2203
Reviewer of new method nisBr, removing extra spaces. Fixes jquery-validation#2203
Fixes new implementation
Fixes #2196
Description
Thank you!