@ashishtwr/validator
v1.0.3
Published
returns a true or false based on certain checks for a string, helpful in form validations
Downloads
7
Maintainers
Readme
Form validator
Usage:
\
const validate = require("@ashishtwr/validator");
validate({
value: "Ashish Tiwari",
max_len: 10,
only_aplha: true
})
All properties:
- value <String> : Pass the value to be validated
- max_len <Integer> : Maximum Length of the value allowed
- only_alpha <Boolean> : Checks for only alphabet characters
- only_num <Boolean> : Checks for only numeric characters
- space_allowed <Boolean> : Checks if space is allowed