InputVariableValidator<T> class
An InputVariableValidator is a class that validates an input variable.
It is used to validate the input variables of a request.
Constructors
- InputVariableValidator(HttpRequest req, String name, {Source source = Source.body, RegExp? regExp, String? regExpErrorMessage, T? onEmpty})
- An InputVariableValidator is a class that validates an input variable.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
the name of the parameter to be found and validated
final
- onEmpty → T?
-
the function to be called when the input variable is empty
final
- regExp → RegExp?
-
the regular expression to validate the input variable
final
- regExpErrorMessage → String?
-
the error message to be returned when the regular expression fails
final
- req → HttpRequest
-
the request
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → Source
-
where the variable should be found
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
optional(
) → Future< T?> - An InputVariableValidator is a class that validates an input variable.
-
required(
) → Future< T> - An InputVariableValidator is a class that validates an input variable.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited