FORM STATE

Signal validation

Coordinate validated controls with derived Signal state. No visual Form component is required.

isValid, isInvalid, errors, and touched are read-only views over the same bound values.

PLAYGROUND

Disable the action until every field passes

The button reads formLogin.isInvalid. The submit function calls validate formLogin before its request.

EmailUse a work address.
Accept the termsRequired to continue.
dowe
signal formLogin value:{ email:"" accepted:false }

Input bind:formLogin.email label:"Email"
  validate rule:"required" message:"Email is required."
  validate rule:"email" message:"Enter a valid email."

Checkbox bind:formLogin.accepted label:"Accept the terms"
  validate rule:"required" message:"Accept the terms to continue."

Button disabled:formLogin.isInvalid onClick:submit
  "Submit"

fn submit
  validate formLogin
  request result method:"POST" route:"/api/auth/login" body:formLogin

DERIVED STATE

One source of truth

The compiler groups validate children by their Signal root. Derived fields never enter persistence or request bodies, and the same rules run on web, Android, and iOS.

formLogin.isValid / formLogin.isInvalid

Use these booleans for disabled actions, visibility, or a summary state.

formLogin.errors.email

Reads the first failing message for a field.

formLogin.touched.email

Tracks interaction and becomes true for every registered field after validate formLogin.