RequiredWith class

Required when any of the keys others is present and not empty: @RequiredWith(['phone']). others are keys in the same object.

Inheritance

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
true when the field is required. parent is the raw input object that holds the field.
override
appliesToField(Object? parent, Object? raw, Object key) → bool
true when the field key is required. parent is the object with the converted values, raw the raw input object. The default calls appliesTo. Filled and Present use raw and key.
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