πValidators
All the validators imports from pegasus-js and how to use them
π
isDate
Verify that the inserted input value is a valid date
import { Validators } from 'pegasus-js'
const instance = new Validators()
instance.isDate('this is not a valid date') // false
instance.isDate('2022-01-01') // trueπ« isEmail
Verify that the inserted input value is a valid email
import { Validators } from 'pegasus-js'
const instance = new Validators()
instance.isEmail('this is not a valid email') // false
instance.isEmail('dev.guilhermebrasil@gmail.com') // trueπ isUrl
Verify that the inserted input value is a valid url
π¨ isColorValid
Verify that the inserted input value has a valid color code
The hex color code must have 6 digits
Last updated