jaredramirez/elm-field/1.0.1

NOTE: this package is not compatible with Elm 0.19.1

Field.Float

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

Base

type alias Field =
Field Float String

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

type alias ViewConfig msg =
ViewConfig Float String msg

A view config object for Float fields. See ViewConfig

type alias ValidationFunc =
ValidationFunc Float String

A validation function for a Float Field

Validation

greaterThan : Float -> ValidationFunc

Enforce that a field is greater than x

lessThan : Float -> ValidationFunc

Enforce that a field is greater than x