-
Notifications
You must be signed in to change notification settings - Fork 839
Description
I come from a php background, where the validation libraries I’m used to, just return true or false (which is awesome), then I do whatever I want from there. So, I opted to use the “Manual validation” here (isEmail precisely), and it worked as expected. (I’m using in a Nativescript application BTW)
Problem is with the second parameter, “options”, whose properties are not mentioned at all in the documentation.
I just ended up setting allow_display_name, allow_utf8_local_part and require_tld to true without even knowing what they mean.
I’d appreciate if these properties (and others like allow_negative_sign_placeholder, host_whitelist and host_blacklist) are explained.
EDIT::
I tried to use the decorators way as shown in the first example, and it worked. BUT console.log("validation failed. errors: ", errors) just outputs 'validation failed. errors: [object Object]' in the terminal. So, I really want to stick with the “Manual validation"