Describe the bug
isIBAN requires a string.
Examples
I'm using Vuelidate to validate form fields. I'm creating helper functions where I extend the isIBAN validator from ValidatorJS:
export const isIBANValidation = (value) => {
return value ? isIBAN(value) : false
}
Without the ternary statement I receive this error:
TypeError: Expected a string but received a null
at assertString (assertString.js?d887:17)
at isIBAN (isIBAN.js?38f4:143)
Other validators like isDate don't have this issue.
Additional context
"validator": "^13.5.2",
"vuelidate": "0.7.6"
I think it's working as expected. Your code where it's not working may have passed value as null, while your ternary operator checks if value is null before passing it to isIBAN
Most helpful comment
I think it's working as expected. Your code where it's not working may have passed value as null, while your ternary operator checks if value is null before passing it to isIBAN