ant-design-blazor/components/form/Validate/FormValidateMode.cs
笨木头 ec45abc4d7 feat(module: form): support set validation rules on FormItem (#1516)
* 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>
2021-05-28 09:08:42 +00:00

22 lines
587 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace AntDesign
{
public enum FormValidateMode
{
/// <summary>
/// Blazor's validate mode. Add validateAttributes on model field
/// Blazor的验证模式在model字段上附加验证特性
/// </summary>
Default = 0,
/// <summary>
/// Set rules on FormItem
/// 在FormItem上设置Rules参数
/// </summary>
Rules = 1,
/// <summary>
/// Use both Default mode and Rules mode
/// 同时使用Default和Rules模式
/// </summary>
Complex = 3,
}
}