bandicoot_validation
library
Functions
-
equals(String string, String comparison)
→ bool
-
Check if two strings are equal.
-
Equals(String comparison, {String? message})
→ ValidationRule
-
ValidationRule for equals validator.
-
isEmail(String string)
→ bool
-
Check if a given string is an email address.
-
IsEmail({String? message})
→ ValidationRule
-
ValidationRule fro isEmail validator.
-
isEnum<T>(T value, T enumType)
→ bool
-
Check if a value is a valid enum value.
-
IsEnum<T>(T enumType, {String? message})
→ ValidationRule
-
ValidationRule for isEnum validator.
-
IsIn(List array, {String? message})
→ ValidationRule
-
-
isPassword(String value, PasswordRules rules)
→ bool
-
-
IsPassword(PasswordRules rules, {String? message})
→ ValidationRule
-
-
isString(dynamic value)
→ bool
-
Check if s given value is indeed a string.
-
IsString({String? message})
→ ValidationRule
-
ValidationRule for isString validator.
-
isUUID(String string, [String version = 'all'])
→ bool
-
Check if a given string is a UUID.
-
IsUUID({String? version = 'all', String? message})
→ ValidationRule
-
ValidationRule for isUUID validator
-
matches(String string, String pattern)
→ bool
-
Check if a string matches a given regex pattern.
-
Matches(String pattern, {String? message})
→ ValidationRule
-
ValidationRule for matches validator.
-
matchesProperty(String property1, String property2, Map map)
→ bool
-
Check if a property value is equal to another property value.
-
MatchesProperty(String property, {String? message})
→ ValidationRule
-
ValidationRule for matchesProperty validator.
-
toDate(String string)
→ DateTime?
-
Convert
string
to a DateTime.
-
ToDate()
→ SanitizeRule
-
SanitizeRule for toDate sanitizer.
-
toInt(String string, {int? radix = 10})
→ num
-
Convert
string
to an int.
-
ToInt({int? radix = 10})
→ SanitizeRule
-
SanitizeRule for toInt sanitizer.
-
toString(dynamic input)
→ String
-
Convert
input
to a String.
-
ToString()
→ SanitizeRule
-
SanitizeRule for toString sanitizer.
-
Validate(_ValidateFunction validate, {String? message})
→ ValidationRule
-
ValidationRule for adding custom validations without the need to create a custom ValidationRule.