Fable.Modulo


Modulo Module

Types and nested modules

Type/Module Description

Auto

This module aims to reduce the form model's boilerplate by reflection. Currently only forms represented by plain records of "FormFieldModel" ("input" elements) are supported

FormCheckboxModel

Functions related to the FormCheckboxModel type

FormFieldLayout (Module)

Functions to handle a field's layout properties. See FormFieldLayout type

FormFieldModel

Functions related to the FormFieldModel type

FormInputModel

Functions related to the FormInputModel type

FormSelectModel

Functions related to the FormSelectModel type

Formatters

Helpers to transform a given object to a string representation

Helpers

Utility functions

Parsers

Helpers to parse the string inserted by the user

View

Helpers for the view. Based on Fable.React: no css or other assumptions are made.

CheckboxBuilder

Computation expression used to build a "checkbox" field model

FormCheckboxModel<'f>

Model for a "checkbox" element.

FormFieldLayout (Type)

Layout-related data

FormFieldModel<'f, 't>

Wrapper type needed to unify the field types

FormInputModel<'f, 't>

The form field model, used for "input" elements

FormSelectModel<'f, 't>

Model for a "select"-like element

IFormFieldModel<'f, 't>

Interface for the "runtime" part of a field (its underlying value)

InputBuilder

Computation expression used to build an "input" field model

SelectBuilder

Computation expression used to build a "select" field model

TooltipKind

Kind of tooltip

Functions and values

Function or value Description

checkbox

Full Usage: checkbox

Returns: CheckboxBuilder

Computation expression used to build a "checkbox" field model

Returns: CheckboxBuilder

input

Full Usage: input

Returns: InputBuilder

Computation expression used to build an "input" field model

Returns: InputBuilder

isValid f

Full Usage: isValid f

Parameters:
    f : 'f

Returns: bool
Modifiers: inline
Type parameters: 'f

Return true if the given form is valid

f : 'f
Returns: bool

select

Full Usage: select

Returns: SelectBuilder

Computation expression used to build a "select" field model

Returns: SelectBuilder

updateForm form field

Full Usage: updateForm form field

Parameters:
Returns: 'f
Modifiers: inline
Type parameters: 'f, 't

Update the form with the given field

form : 'f
field : FormFieldModel<'f, 't>
Returns: 'f

validate f

Full Usage: validate f

Parameters:
    f : 'f

Returns: (string * string) list option A list of couples (field name, error message) if there is at least one error, None if the form is valid
Modifiers: inline
Type parameters: 'f

Validate the form.

f : 'f
Returns: (string * string) list option

A list of couples (field name, error message) if there is at least one error, None if the form is valid

Active patterns

Active pattern Description

(|FieldError|_|) x

Full Usage: (|FieldError|_|) x

Parameters:
Returns: string option

Extract the field's error in a pattern matching

x : IFormFieldModel<'a, 'b>
Returns: string option
Example


 match myForm with
 | {MyField = FieldError value} -> ...do something...
 | _ -> ...do sometnihg else...

(|FieldValue|_|) x

Full Usage: (|FieldValue|_|) x

Parameters:
Returns: 'b option

Extract the field's value in a pattern matching

x : IFormFieldModel<'a, 'b>
Returns: 'b option
Example


 match myForm with
 | {MyField = FieldValue value} -> ...do something...
 | _ -> ...do sometnihg else...