Validator.js: chore(README): add the supported locales for various validators

Created on 5 Mar 2020  路  7Comments  路  Source: validatorjs/validator.js

e.g. isPassportNumber, etc.

good first issue help wanted 馃嵖 discussion

Most helpful comment

@profnandaa can i work on a PR where we can accept a string and an array as a parameter and rename it to locale in the documentation?

All 7 comments

@profnandaa i was thinking about fixing it the other day and i had a little concern, should we rename countryCode to locale to have consistent naming across the lib?

@tux-tn -- sure, standardization will be great. However, we will have backward compatibility to deal with.

@profnandaa can i work on a PR where we can accept a string and an array as a parameter and rename it to locale in the documentation?

@tux-tn -- can give an example?

@profnandaa: It looks like the documentation side of things has already been handled from looking at the README, so is this issue now for removing instances of countryCode as parameter names and replacing them with locale?

From doing a quick search through the code base, it looks like we could rename the remaining parameters without causing backwards compatibility issues, and I'll be happy to submit a PR if this is true

@jmartin4563 -- sure, the issue will be mainly dealing with backward compatibility. I'm more of the idea that we go for CC for stuff that's territorial, and I know this contradicts with what we've done already with stuff like PostalCode, PhoneNumber, etc... what would be your suggestion?

@profnandaa Started work on adding 'DE' locale for isTaxID.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philfreo picture philfreo  路  3Comments

malkhuzayyim picture malkhuzayyim  路  4Comments

rubiin picture rubiin  路  3Comments

galki picture galki  路  3Comments

Maxreglez picture Maxreglez  路  3Comments