AP
Size: a a a
AP
AP
AZ
IZ
IZ
IZ
AZ
IZ
IZ
AZ
AE
type alias Field a = {
value: a,
error: String
}
a
IntfieldType field =
case field.value of
Int -> "number"
_ -> "text"
Cannot find pattern `Int`
93| Int -> "number"
^^^
AP
AP
AP
AP
AP
AE
Field a
и в зависимости от этого заренедрить input с правильным типом?K
AP
type Value = IntValue Int | TextValue String
type alias Field = {
value: Value,
error: String
}
fieldType field =
case field.value of
IntValue _ -> "number"
TextValue _ -> "text"
AE