RequiredWith class
Required when any of the keys others is present and not empty:
@RequiredWith(['phone']). others are keys in the same object.
- Inheritance
-
- Object
- RequiredWhen
- RequiredWith
Constructors
-
RequiredWith(List<
String> others, {String? message}) -
const
Properties
- checksValues → bool
-
false: the rule runs only when the value is missing or empty.true: it runs for every value (Prohibited, ProhibitedIf).no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
finalinherited
-
others
→ List<
String> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
appliesTo(
Object? parent) → bool -
truewhen the field is required.parentis the raw input object that holds the field.override -
appliesToField(
Object? parent, Object? raw, Object key) → bool -
truewhen the fieldkeyis required.parentis the object with the converted values,rawthe raw input object. The default calls appliesTo. Filled and Present userawandkey.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited