How will new validations be decided? #53
-
I'm the kind of person that likes to ask for new features that I believe are beneficial to developers. If I wanted to ask for a new transformation or validation how would you decide whether it's worth adding? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
If it is generally useful, needed by many or corresponds to a standard, for example like ISO timestamp or UUID, I am open for any ideas. Due to the modular design it has no impact on existing users if we extend the functionality here. A validation of credit cards would be cool for example. I just added a function today with |
Beta Was this translation helpful? Give feedback.
-
I'm sorry I don't know the library so I'll have to use a regular function. Characters based on only letters not spaces
function numOfLettersInThisStringIsEqualToTheNumber(string:string, number:number) {
const trimmedStringLength = string.trim().length
if(trimmedStringLength !== number)
throw new Error("The characters in this string are invalid")
} |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
If it is generally useful, needed by many or corresponds to a standard, for example like ISO timestamp or UUID, I am open for any ideas. Due to the modular design it has no impact on existing users if we extend the functionality here.
A validation of credit cards would be cool for example. I just added a function today with
isLuhnAlgo
that could be useful for this. On the other hand, I'm cautious about things like phone number, as it will be impossible to cover every country and variant.