Attributes
Members list
Type members
Classlikes
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Validator[T]class Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait Validator[TT]class Objecttrait Matchableclass AnyShow all
Types
Value members
Concrete methods
Create a custom validator.
Create a custom validator.
Value parameters
- showMessage
-
Description of the validator used when invoking Validator.show.
- validationLogic
-
The logic of the validator
Attributes
Create an enumeration validator, with the given possible values.
Create an enumeration validator, with the given possible values.
To represent the enumerated values in documentation, an encoding function needs to be provided. This can be done:
- by using the overloaded enumeration method with an
encode
parameter - by adding an encode function on an Validator.Enumeration instance using one of the
.encode
functions - by adding the validator directly to a codec (see Mapping.addEncodeToEnumValidator)
- when the values possible values are of a basic type (numbers, strings), the encode function is inferred if not present, when being added to the schema, see Schema.validate
Attributes
Create an enumeration validator, with the given possible values, an optional encoding function (so that the enumerated values can be represented in documentation), and an optional name (to create a reusable documentation component).
Create an enumeration validator, with the given possible values, an optional encoding function (so that the enumerated values can be represented in documentation), and an optional name (to create a reusable documentation component).
Value parameters
- encode
-
Specify how values of this type can be encoded to a raw value, which will be used for documentation.
Attributes
A validator instance that always pass.
A validator instance that always pass.
Attributes
A validator instance that always reject.
A validator instance that always reject.
Attributes
Inherited methods
Creates an enum validator for an enum
where all cases are parameterless, or where all subtypes of the sealed hierarchy T
are object
s. This enumeration will only be used for documentation, as a value outside of the allowed values will not be decoded in the first place (the decoder has no other option than to fail).
Creates an enum validator for an enum
where all cases are parameterless, or where all subtypes of the sealed hierarchy T
are object
s. This enumeration will only be used for documentation, as a value outside of the allowed values will not be decoded in the first place (the decoder has no other option than to fail).
Attributes
- Inherited from:
- ValidatorMacros