Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- filterFailedValidations :: Map Text (Validation err) -> Map Text (Validation err)
- isEqualTo :: (Show a, Eq a) => a -> ValidationRule a
- isLesserThan :: (Show a, Ord a) => a -> ValidationRule a
- isNegative :: ValidationRule Int
- isNegativeOrZero :: ValidationRule Int
- isNonEmptyText :: ValidationRule Text
- isPositive :: ValidationRule Int
- isPositiveOrZero :: ValidationRule Int
- isTextOfLength :: Int -> ValidationRule Text
- isTextSmallerThan :: Int -> ValidationRule Text
- isTextSmallerThanOrEqual :: Int -> ValidationRule Text
- isNotEqualTo :: (Show a, Eq a) => a -> ValidationRule a
Documentation
filterFailedValidations :: Map Text (Validation err) -> Map Text (Validation err) Source #
Filter a Map of Validation err
and keep only the failures.
isEqualTo :: (Show a, Eq a) => a -> ValidationRule a Source #
Validate that a value is equal to another.
isLesserThan :: (Show a, Ord a) => a -> ValidationRule a Source #
Validate that a value is lesser than another.
isNegative :: ValidationRule Int Source #
Validate that a value is lesser than 0.
isNegativeOrZero :: ValidationRule Int Source #
Validate that a value is negative or zero.
isNonEmptyText :: ValidationRule Text Source #
Validate that a value is a non empty Text
.
isPositive :: ValidationRule Int Source #
Validate that a value is greater than 0.
isPositiveOrZero :: ValidationRule Int Source #
Validate that a value is positive or zero.
isTextOfLength :: Int -> ValidationRule Text Source #
Validate that a value is a Text
of certain length.
isTextSmallerThan :: Int -> ValidationRule Text Source #
Validate that a value is a Text
of length smaller than n.
isTextSmallerThanOrEqual :: Int -> ValidationRule Text Source #
Validate that a value is a Text
of length smaller or equal to n.
isNotEqualTo :: (Show a, Eq a) => a -> ValidationRule a Source #
Validate that a value is different to another.