jaredramirez / elm-field / Field.Int

A pre-applied Int version of the Field type, and validation functions to go along with them.

Base


type alias Field =
Field Basics.Int String

A field to hold a Int value, with an error type of String. See Field


type alias ViewConfig msg =
Field.ViewConfig Basics.Int String msg

A view config object for Int fields. See ViewConfig


type alias ValidationFunc =
Field.ValidationFunc Basics.Int String

A validation function for an Int Field

Validation

atLeast : Basics.Int -> ValidationFunc

Enforce that the a field is at least x digits long

atMost : Basics.Int -> ValidationFunc

Enforce that a field is at most x digits long

greaterThan : Basics.Int -> ValidationFunc

Enforce that a field is greater than x

greaterThanOrEqual : Basics.Int -> ValidationFunc

Enforce that a field is greater than or equal to x

lessThan : Basics.Int -> ValidationFunc

Enforce that a field is less than x

lessThanOrEqual : Basics.Int -> ValidationFunc

Enforce that a field is less than or equal to x