This module contains a reusable NumberField
type.
Form.Field.Field (Attributes number) String values
Represents a number field.
Note: You should not need to care about this unless you are creating your own custom fields or writing custom view code.
{ label : String
, placeholder : String
, step : Maybe number
, min : Maybe number
, max : Maybe number
}
The attributes of a NumberField.
You need to provide these to:
Its step
is a Maybe -- Nothing
represents the HTML attribute value of "any". If you want only integers allowed, use Just 1
.
form : (NumberField number values -> field) -> Form.Base.FieldConfig (Attributes number) String values output -> Form.Base.Form values output field
Builds a Form
with a single NumberField
.
Note: You should not need to care about this unless you are creating your own custom fields.