Class: FieldNode
@react-logic/utilsDefined in: utils/src/lib/forms.ts:272
Type Parameters
T
T = unknown
Constructors
Constructor
new FieldNode<
T>(path,config):FieldNode<T>
Defined in: utils/src/lib/forms.ts:293
Parameters
Returns
FieldNode<T>
Properties
dirty
readonlydirty: () =>boolean
Defined in: utils/src/lib/forms.ts:291
Dirty = value differs from initial.
Returns
boolean
errors
readonlyerrors: () =>Record<string,string|null>
Defined in: utils/src/lib/forms.ts:289
Per-validator-name error map.
Returns
Record<string, string | null>
htmlAttrs
readonlyhtmlAttrs:HTMLValidationAttrs
Defined in: utils/src/lib/forms.ts:279
initial
readonlyinitial:T
Defined in: utils/src/lib/forms.ts:275
kind
readonlykind:"text"|"checkbox"|"radio"|"select"
Defined in: utils/src/lib/forms.ts:276
parse?
readonlyoptionalparse?: (raw) =>T
Defined in: utils/src/lib/forms.ts:277
Parameters
raw
string
Returns
T
path
readonlypath:string
Defined in: utils/src/lib/forms.ts:273
pathKey
readonlypathKey:string
Defined in: utils/src/lib/forms.ts:274
rawValue
readonlyrawValue: {():string|boolean; (value):void; }
Defined in: utils/src/lib/forms.ts:282
Underlying raw input (string for text/select/radio, boolean for checkbox).
Call Signature
():
string|boolean
Returns
string | boolean
Call Signature
(
value):void
Parameters
value
string | boolean
Returns
void
touched
readonlytouched: {():boolean; (value):void; }
Defined in: utils/src/lib/forms.ts:284
Touched state — flips true on blur or on submit.
Call Signature
():
boolean
Returns
boolean
Call Signature
(
value):void
Parameters
value
boolean
Returns
void
validators
readonlyvalidators: readonlyValidatorEntry<T>[]
Defined in: utils/src/lib/forms.ts:278
value
readonlyvalue: () =>T
Defined in: utils/src/lib/forms.ts:287
Parsed/typed value — read this for values.
Returns
T
Methods
isValid()
isValid():
boolean
Defined in: utils/src/lib/forms.ts:380
Returns
boolean
reset()
reset():
void
Defined in: utils/src/lib/forms.ts:371
Returns
void