PatternMixin

external interface PatternMixin : InputConstraintsMixin

A mixin to provide pattern property.

Inheritors

Properties

Link copied to clipboard
abstract var invalid: Boolean

Set to true when the field is invalid.

Link copied to clipboard

Set to true to enable manual validation mode. This mode disables automatic constraint validation, allowing you to control the validation process yourself. You can still trigger constraint validation manually with the validate() method or use checkValidity() to assess the component's validity without affecting the invalid state. In manual validation mode, you can also manipulate the invalid property directly through your application logic without conflicts with the component's internal validation.

Link copied to clipboard
abstract var pattern: String

A regular expression that the value is checked against. The pattern must match the entire value, not just some subset.

Link copied to clipboard
abstract var required: Boolean

Specifies that the user must fill in a value.

Link copied to clipboard
abstract var value: String

The value of the field.

Functions

Link copied to clipboard
abstract fun checkValidity(): Boolean

Returns true if the field value satisfies all constraints (if any).

Link copied to clipboard
abstract fun clear()

Clear the value of the field.

Link copied to clipboard
abstract fun validate(): Boolean

Validates the field and sets the invalid property based on the result.