[−][src]Module valid::constraint
Constraints defined by this crate
For each constraint the possible error codes are defined as a set of constants. The name of the constants follow the naming convention:
INVALID_<constraint-name>[_<variant>]
The -
) instead of the underscore to separate
terms. Thus the codes are compatible with the convention used in the
fluent project.
Structs
AssertFalse | The value must be false. |
AssertTrue | The value must be true. |
Contains | The value must contain the specified member or the specified member must be part of the value. |
Digits | Maximum number of allowed integer digits and fraction digits. |
MustMatch | Two related fields must be equal. |
NonZero | Values of zero are not allowed. |
NotEmpty | The value must not be empty. |
Pattern | The value must match some regular expression. |
Enums
Bound | The value must be within some bounds. |
CharCount | The number of characters must be within some bounds. |
Length | The length of a value must be within some bounds. |
MustDefineRange | Two related fields must define a range. |
Constants
INVALID_ASSERT_FALSE | Error code: the value does not assert to false ( |
INVALID_ASSERT_TRUE | Error code: the value does not assert to true ( |
INVALID_BOUND_CLOSED_MAX | Error code: the value is not less than or equal to the specified maximum
( |
INVALID_BOUND_CLOSED_MIN | Error code: the value is not greater than or equal to the specified minimum
( |
INVALID_BOUND_EXACT | Error code: the value is not exactly the specified value
( |
INVALID_BOUND_OPEN_MAX | Error code: the value is not less than the specified maximum
( |
INVALID_BOUND_OPEN_MIN | Error code: the value is not greater than the specified minimum
( |
INVALID_CHAR_COUNT_EXACT | Error code: the number of characters is not exactly the specified value
( |
INVALID_CHAR_COUNT_MAX | Error code: the number of characters is not less or equal the specified
maximum ( |
INVALID_CHAR_COUNT_MIN | Error code: the number of characters is not greater or equal the specified
minimum ( |
INVALID_CONTAINS_ELEMENT | Error code: the value does not contain the specified member element
( |
INVALID_DIGITS_FRACTION | Error code: the number of fraction digits is not less than or equal to the
specified maximum ( |
INVALID_DIGITS_INTEGER | Error code: the number of integer digits is not less than or equal to the
specified maximum ( |
INVALID_LENGTH_EXACT | Error code: the length is not the exactly the specified value
( |
INVALID_LENGTH_MAX | Error code: the length is not less or equal the specified maximum
( |
INVALID_LENGTH_MIN | Error code: the length is not greater or equal the specified minimum
( |
INVALID_MUST_DEFINE_RANGE_EXCLUSIVE | Error code: the first value is not less than the second value
( |
INVALID_MUST_DEFINE_RANGE_INCLUSIVE | Error code: the first value is not less than or equal to the second value
( |
INVALID_MUST_MATCH | Error code: the two values do not match ( |
INVALID_NON_ZERO | Error code: the value is zero ( |
INVALID_NOT_EMPTY | Error code: the value is empty ( |
INVALID_PATTERN | Error code: the value does not match the specified pattern
( |