toggle menu
doodle
0.10.3
common
switch theme
search in API
controls
/
io.nacular.doodle.controls.form
/
fold
fold
inline
fun
<
R
,
T
>
Form.FieldState
<
T
>
.
fold
(
onValid
:
(
value
:
T
)
->
R
,
default
:
R
)
:
R
(
source
)
inline
fun
<
R
,
T
>
Form.Field
<
T
>
.
fold
(
onValid
:
(
value
:
T
)
->
R
,
default
:
R
)
:
R
(
source
)
Returns the result of
onValid
if this instance is
valid
or
default
if it is
invalid
.