-
Notifications
You must be signed in to change notification settings - Fork 811
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
Does IsDecimal do what it should do? #1423
Comments
Why do you think |
Under the hood this libarary uses |
It seems like the docstring for @kaytrance, judging by your description you probably want to use /**
* Checks if the string contains only letters and numbers.
* If given value is not a string, then it returns false.
*/
export function isAlphanumeric(value: unknown, locale?: ValidatorJS.AlphanumericLocale): boolean {
return typeof value === 'string' && isAlphanumericValidator(value, locale);
} We need to update the docstring for |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Why
IsDecimal()
decorator description says that "Checks if the string contains only letters and numbers. If given value is not a string, then it returns false." and it does not check of the value was decimal or not?While
isDecimal()
contains proper description and probably does that it means.For example
@IsDecimal
on a field with value 123.45 passes validation while it should not, imo.The text was updated successfully, but these errors were encountered: