FieldCssClassProvider.GetFieldCssClass(EditContext, FieldIdentifier) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a string that indicates the status of the specified field as a CSS class.
The result is one of "valid", "invalid", "pending", or "faulted",
optionally prefixed with "modified " when
IsModified(FieldIdentifier) is true.
"pending"is emitted while an async validation task registered via AddValidationTask(FieldIdentifier, Task, CancellationTokenSource) is in flight, and supersedes valid/invalid since the outcome is not yet known."faulted"is emitted when the field's last async validation threw a non-cancellation exception, and supersedes valid/invalid since the infrastructure failed to determine validity."valid"or"invalid"reflects whether any validation messages exist for the field once no pending or faulted state applies.
public:
virtual System::String ^ GetFieldCssClass(Microsoft::AspNetCore::Components::Forms::EditContext ^ editContext, Microsoft::AspNetCore::Components::Forms::FieldIdentifier ^ fieldIdentifier);
public virtual string GetFieldCssClass(Microsoft.AspNetCore.Components.Forms.EditContext editContext, in Microsoft.AspNetCore.Components.Forms.FieldIdentifier fieldIdentifier);
abstract member GetFieldCssClass : Microsoft.AspNetCore.Components.Forms.EditContext * FieldIdentifier -> string
override this.GetFieldCssClass : Microsoft.AspNetCore.Components.Forms.EditContext * FieldIdentifier -> string
Public Overridable Function GetFieldCssClass (editContext As EditContext, fieldIdentifier As FieldIdentifier) As String
Parameters
- editContext
- EditContext
The EditContext.
- fieldIdentifier
- FieldIdentifier
The FieldIdentifier.
Returns
A CSS class name string.