hasFieldArray
Checks if the specified field array is included in the form.
const value = hasFieldArray(form, name, options);
Parameters
form
FormStore
name
string
options
object =
{}
shouldActive
boolean =
true
shouldTouched
boolean =
false
shouldDirty
boolean =
false
shouldValid
boolean =
false
Explanation
By default false
is returned if the field array is inactive. To change this behavior you can set shouldActive
to false
.
If you want false
to be returned when the field array is not touched, not dirty and/or not valid, you can set shouldTouched
, shouldDirty
and/or shouldValid
to true
.
shouldActive
, shouldTouched
, shouldDirty
and shouldValid
act like a kind of filter and can be combined with each other.
Return
value
boolean