annotations.string library

To use, import package:validations/annotations/string.dart

Classes

Alpha
Checks that the annotated string contains only alpha characters A-z.
CreditCardNumber
Checks that the annotated string passes the Luhn checksum test.
Email
Checks whether the specified string is a valid email address.
Hexadecimal
Checks that the annotated string is a valid hexadecimal.
HexColor
Checks that the annotated string is a valid hex color.
ISBN
Checks that the annotated string is a valid ISBN. type determines the type of ISBN. The default is ISBN-13.
Json
Checks that the annotated string is valid JSON.
Lowercase
Checks that the annotated string is in lowercase.
MongoId
Checks that the annotated string is a valid mongo id.
Numeric
Checks that the annotated string is a valid number.
Pattern
Checks if the annotated string matches the regular expression RegExp pattern.
Uppercase
Checks that the annotated string is uppercase.
URL
Checks if the annotated string is a valid URL according to RFC2396. If any of the optional parameters protocol, host or port are specified, the corresponding URL fragments must match the specified values. The optional parameter regexp allow to specify an additional regular expression which the URL must match.
Uuid
Checks that the annotated string is a UUID. [...]

Constants

alpha → const Alpha
Alpha annotation using default values
const Alpha()
creditCardNumber → const CreditCardNumber
CreditCardNumber annotation using default values
email → const Email
Email annotation using default values
const Email()
hexadecimal → const Hexadecimal
Hexadecimal annotation using default values
const Hexadecimal()
hexcolor → const HexColor
HexColor annotation using default values
const HexColor()
isbn → const ISBN
ISBN annotation using default values
const ISBN()
json → const Json
Json annotation using default values
const Json()
lowercase → const Lowercase
Lowercase annotation using default values
const Lowercase()
mongoId → const MongoId
MongoId annotation using default values
const MongoId()
numeric → const Numeric
Numeric annotation using default values
const Numeric()
uppercase → const Uppercase
Uppercase annotation using default values
const Uppercase()
url → const URL
URL annotation using default values
const URL()
uuid → const Uuid
Uuid annotation using default values
const Uuid()

Properties

stringAnnotations → List<Object>
final