1.0.0 • Published 2 years ago
@think-smart/form-validator v1.0.0
Form validator helps to validate form-fields in a smarter way
Example
const validator = require('@think-smart/form-validator');
isInitCap - Every word/s first char should be in uppercase & maximum one space can be allowed within words validator.isInitCap("Hey, How Are You?") - true validator.isInitCap("Hey, how Are You?") - false initCap - Make first character of all words in a sentence in uppercase validator.initCap('hey john, how are you!') - Hey John, How Are You! trimSpace - Remove extra space within words validator.trimSpace('hi john , will call you tomorrow . OK ?') - hi john, will call you tomorrow. OK?