import {string} from 'valid.js'
Checks for a 'String'
import {validate, string} from 'valid.js'
let isvalid = validate(string.isString)
let result = isvalid('Test ValidateJS')
// result => true
Validates the size of the 'string' is greater than or equal to (>=) the value
import {validate, string} from 'valid.js'
let isvalid = validate(string.minLength(15))
let result = isvalid('Test ValidateJS')
// result => true
let resultFalse = isvalid('TestValidateJS')
// resultFalse => false
Validates the size of the 'string' is less than or equal to (<=) the value
import {validate, string} from 'valid.js'
let isvalid = validate(string.maxLength(15))
let result = isvalid('Test ValidateJS')
// result => true
let resultFalse = isvalid('Test ValidateJS Brazil')
// resultFalse => false
Validates that the length of the string is within the range
import {validate, string} from 'valid.js'
let isvalid = validate(string.length(10, 15))
let result = isvalid('Test ValidateJS')
// result => true
let resultFalse = isvalid('Test ValidateJS Brazil')
// resultFalse => false
Validate regular expressions
import {validate, string} from 'valid.js'
let isvalid = validate(string.regex(/a/))
let result = isvalid('Test ValidateJS')
// result => true
let resultFalse = isvalid('Test VlidteJS Brzil')
// resultFalse => false
.