RequestValidator class
Checks request input with a DTO or a fluent schema.
A failed check throws the dox-core ValidationException (HTTP 422)
with {"path": "message"}.
Constructors
- RequestValidator({FormInput forms = const FormInput()})
-
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateDto(
DoxRequest req, DtoSchema< Object> schema, {Source? source}) → Future<Object> -
Check the input of
reqwithschemaand give the object.sourcewins over thesourceof the DTO. -
validateSchema<
O> (Schema< O> schema, Object? data) → Future<O> -
Check
datawith any schema and give its typed output.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited