Built-In Rules
String
built-in rules for String
AlphaDigit
AlphaDigit
is a type that signifies the target is composed only of alphabets and digits.
Alphabet
Alphabet
is a type that signifies the target is composed only of alphabets.
Digit
Digit
is a type that signifies the target is composed only of digits.
Email
is a type that signifies the target is a valid email address.
Ipv4Addr
Ipv4
is a type that signifies the target is a valid IPv4 address.
Ipv6Addr
Ipv6Addr
is a type that signifies the target is a valid IPv6 address.
Regex
Regarding regex, since Rust DOES NOT currently support const generics for String types, refined_type
takes an approach of generating rules using macros.
This approach allows us to validate fields using regex patterns without relying on const generics for strings.