palace_validators library

Classes

Contains
checks if the input does contain the provided value;
ContainsAny
check if the value contain at lest one of String form the provided list
IsEmail
checks if the input is a valid email address
IsIn
checks if the input is in provided List;
IsNotIn
checks if the input is NOT in provided List;
IsOptional
allows you to skip the errors if the input is null
IsRequired
checks if the input is not empty string
Match
checks if the input is match other string
MaxLength
checks if the input characters length is smaller than the min field
MinLength
checks if the input characters length is bigger than the min field
NotContains
checks if input does not contain the provided value;
NotContainsAny
check if the value does not contain any item from the provided list
QRule
RegExpRule
allow using a regular expression as validation rule
TextValidationRule
interface for the queen validation rules T => Type Of Input to apllay validation to val is! T => failure

Functions

base64(String str, {bool? urlSafe}) bool
containsAny(String v, List<String> list) bool
isAscii(String str) bool
isBase32(String str) bool
isBase58(String str) bool
isBIC(String str) bool
isBoolean(dynamic v) bool
isBtcAddress(String str) bool
isCreditCard(String str) bool
isEmail(String email) bool
checks if the value can be well formatted email address
isEmpty(String string) bool
trim the string then checks if isEmpty
isHexColor(String str) bool
isIn(dynamic v, List list) bool
check if string is in List<String>
isNotEmpty(String string) bool
trim the string then checks if isNotEmpty
isNotIn(dynamic v, List list) bool
check if value is NOT in List
match(Object val1, Object val2) bool
checks if two Strings are the same !after trimming them
maxLength(String val, int max) bool
minLength(String val, int min) bool
notContainsAny(String v, List<String> list) bool
qValidator(List<TextValidationRule> rules) String? Function(String?)
? build and return String Function(String value) function which triggers the provided validation rules
validateDto(Object dto) List<String>
takes dto and return list of faliure errors message