Class User_UserName
Inherited Members
Namespace: DataWeb.Data.Controls
Assembly: DataWeb.Core.dll
Syntax
public class User_UserName : TextBox
Constructors
User_UserName(Form, IServiceProvider)
Declaration
public User_UserName(Form form, IServiceProvider serviceProvider)
Parameters
| Type | Name | Description |
|---|---|---|
| Form | form | |
| IServiceProvider | serviceProvider |
Methods
ValidateAsync(object, List<ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
Validates the control value asynchronously. The base implementation checks whether the control is required (via ValidateControlIsRequired(object)) and whether the value matches the declared DataType (via ValidateControlDataType(object)).
Declaration
public override Task<List<ValidationError>> ValidateAsync(object value, List<Form.ProvidedValue> providedValues, Dictionary<string, object> sectionData, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The value of the control to validate. |
| List<Form.ProvidedValue> | providedValues | All values provided for the form submission. |
| Dictionary<string, object> | sectionData | The section data associated with the current item. |
| IUser | user | The IUser submitting the form. |
| string | itemId | The Id of the item being edited, or |
| NavigationContext | navigationContext | The NavigationContext of the form, if applicable. |
| CancellationToken | cancellationToken | A token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| Task<List<ValidationError>> | A task that represents the asynchronous operation and returns the list of validation errors, if any. |