Skip to content

fsValidate

Compare
Choose a tag to compare
@dtrelogan dtrelogan released this 12 Mar 19:38
· 270 commits to master since this release

a single "breaking" change of note, the default 'required' function is now:

FormState.required = function(value) {
  if (typeof(value) !== 'string' || value.trim() === '') { return 'Required field'; }
}

if you provide something other than a string it will fail validation.

you can suppress required validation while keeping the required tag in your jsx:

<Input required='-' fsv={v => v.minlen(1).msg('Please select a role')} />