MudBlazor

MudForm API

Pages

Properties

Name Type Default Description
ChildContent
RenderFragment

null

Child content of component.
Errors
String[]

Validation error messages.
IsTouched
Boolean

False

True if any field of the field was touched. This parameter is readonly.
IsValid
Boolean

True

Validation status. True if the form is valid and without errors. This parameter is two-way bindable.
Model
Object

null

Specifies the top-level model object for the form. Used with Fluent Validation
SuppressImplicitSubmission
Boolean

True

When true, will not cause a page refresh on Enter if any input has focus. https://www.w3.org/TR/2018/SPSD-html5-20180327/forms.html#implicit-submission Usually this is not wanted, as it can cause a page refresh in the middle of editing a form. When the form is in a dialog this will cause the dialog to close. So by default we suppress it.
SuppressRenderingOnValidation
Boolean

False

When true, the form will not re-render its child contents on validation updates (i.e. when IsValid changes). This is an optimization which can be necessary especially for larger forms on older devices.
ValidationDelay
Int32

300

Validation debounce delay in milliseconds. This can help improve rendering performance of forms with real-time validation of inputs i.e. when textfields have Immediate="true".
Inherited from MudComponentBase
Class
String

null

User class names, separated by space.
Style
String

null

User styles, applied on top of the component's own classes and styles.
Tag
Object

null

Use Tag to attach any user data object to the component for your convenience.
UserAttributes
Dictionary<String, Object>

UserAttributes carries all attributes you add to the component that don't match any of its parameters. They will be splatted onto the underlying HTML tag.

EventCallbacks

Name Type Description
ErrorsChanged
EventCallback<String[]>
IsTouchedChanged
EventCallback<Boolean>
Raised when IsTouched changes.
IsValidChanged
EventCallback<Boolean>
Raised when IsValid changes.

Methods

Name Parameters Return Description
Dispose()
Reset() Reset all form controls and reset their validation state.
ResetValidation() Reset the validation state but keep the values.
Task Validate()
Task
Force a validation of all form controls, even if they haven't been touched by the user yet.
An error has occurred. This application may no longer respond until reloaded. Reload 🗙