mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 09:21:24 +08:00
ec45abc4d7
* feat(module: form): support set validation rules on FormItem(not complete yet) * refactor(module: form): optimized code * feat(module: form): support Whitespace rule * feat(module: form): support [message、pattern、transform、validator、whitespace] rules * feat(module: form): support type rule * feat(module: form): support [defaultField、oneOf、fields、type] rules * feat(module: form): support custome validate messages(without test) * test(module: form): complete RuleValidate_ValidateMessages test * feat(module: form): complete DynamicRule demo, refactor code, fix bugs * feat(module: form): support ValidateMessages param * doc(module: form): add "Rules" and "ValidateMessages" docs * fix: Rule.Max's errorMessage is wrong * refactor: rename Rule to FormValidationRule * test: rename Rule to FormValidationRule * chore: refactor code and rename classes * Update ValidateMode.razor * Update FormValidateErrorMessages.cs * Update FormValidateHelper.cs Co-authored-by: James Yeung <shunjiey@hotmail.com>
42 lines
922 B
C#
42 lines
922 B
C#
using System;
|
|
using AntDesign.Forms;
|
|
using Microsoft.AspNetCore.Components.Forms;
|
|
|
|
namespace AntDesign.Internal
|
|
{
|
|
public interface IForm
|
|
{
|
|
internal ColLayoutParam WrapperCol { get; }
|
|
|
|
internal ColLayoutParam LabelCol { get; }
|
|
|
|
internal AntLabelAlignType? LabelAlign { get; }
|
|
|
|
internal EditContext EditContext { get; }
|
|
|
|
internal FormValidateMode ValidateMode { get; }
|
|
internal FormValidateErrorMessages ValidateMessages { get; }
|
|
|
|
internal string Size { get; }
|
|
|
|
internal void AddFormItem(IFormItem formItem);
|
|
|
|
internal void AddControl(IControlValueAccessor valueAccessor);
|
|
|
|
internal bool ValidateOnChange { get; }
|
|
|
|
event Action<IForm> OnFinishEvent;
|
|
|
|
bool IsModified { get; }
|
|
|
|
string Name { get; }
|
|
object Model { get; }
|
|
|
|
void Reset();
|
|
|
|
void Submit();
|
|
|
|
bool Validate();
|
|
}
|
|
}
|