Skip to content
Shamar

TextInput

Form components gallery at `/demo/form-components`.
TextInput.make('name').required().searchable()
TextInput.make('price').currency('KES').min(0)
TextInput.make('sku').unique().maxLength(32)

Methods

MethodDescription
.email()Email input.
.password() / .revealable()Password with optional reveal.
.url() / .tel()URL or tel keyboard hints.
.numeric() / .integer()Number input.
.currency(code)Currency prefix and formatting.
.unique({ message })Unique validation message.
.prefix() / .suffix()Affix text or icons.
.maxLength(n) / .pattern(regex)Length and pattern validation.
.label(text)Field label in the UI.
.required()Mark required on create/edit.
.helperText(text)Help text below the control.
.default(value)Default state when creating a record.
.hiddenOnForm() / .hiddenOnDetail()Hide on create/edit or show view.
.columnSpan(n) / .columnSpanFull()Grid span inside Section/Grid layouts.
.live()Re-render the form when this field changes.

Form components gallery at /demo/form-components.