bkuhlmann/form-validator/1.2.0

NOTE: this package is not compatible with Elm 0.19.1

FormValidator.Validator

The Form Validator validator which is the main module used to update/validate forms and fields.

init : key -> Validators -> Field key

Initialize a new form field.

fieldValues : key -> Form key -> List String

Answer multiple field values.

fieldValue : key -> Form key -> String

Answer single field value.

fieldErrors : key -> Form key -> Errors

Answer all errors for a field.

updateValues : key -> Values -> Form key -> Form key

Update multiple field values without validation.

updateValuesAndValidate : key -> Values -> Form key -> Form key

Update field values and validate them.

updateValue : key -> Value -> Form key -> Form key

Update single field value without validation.

updateValueAndValidate : key -> Value -> Form key -> Form key

Update field value and validate it.

resetForm : Form key -> Form key

Reset field values and errors for entire form to initial state.

resetField : key -> Form key -> Form key

Reset field value(s) and errors to initial state.

updateAndValidateValues : key -> Values -> Form key -> Form key

DEPRECATED: Will be removed in 2.0.0. Use updateValuesAndValidate instead.

Update field values and validate them.

updateAndValidateValue : key -> Value -> Form key -> Form key

DEPRECATED: Will be removed in 2.0.0. Use updateValueAndValidate instead.

Update field value and validate it.

validateForm : Form key -> Form key

Validate form (including all fields).

validateField : key -> Form key -> Form key

Validate field.

isFormInvalid : Form key -> Bool

Answer if form is invalid.

isFieldInvalid : key -> Form key -> Bool

Answer if field is invalid.