1.0.3 • Published 4 years ago

javascript-input-validator v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

javascript-input-validator

Javascript based form validator.

let errors = validator(fieldsSchema);

if(!errors) { Success code. } else { Set errors in a state or some variable from where you can access errors object. }

Then, in an input field you can write so, for example, in case of React,

If there is any error, the function validator() returns an object of errors with relevant keys.

If all fields are valid, it gives false (boolean).