File tree 4 files changed +6
-6
lines changed
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const FormProps = {
23
23
24
24
export const ValidationRule = {
25
25
/** validation error message */
26
- message : PropTypes . string ,
26
+ message : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
27
27
/** built-in validation type, available options: https://github.com/yiminghe/async-validator#type */
28
28
type : PropTypes . string ,
29
29
/** indicates whether field is required */
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ export const FormProps = {
75
75
76
76
export const ValidationRule = {
77
77
/** validation error message */
78
- message : PropTypes . string ,
78
+ message : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . func ] ) ,
79
79
/** built-in validation type, available options: https://github.com/yiminghe/async-validator#type */
80
80
type : PropTypes . string ,
81
81
/** indicates whether field is required */
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ declare interface ValidationRule {
11
11
trigger ?: string ;
12
12
/**
13
13
* validation error message
14
- * @type string
14
+ * @type string | Function
15
15
*/
16
- message ?: string ;
16
+ message ?: string | ( ( ) => string )
17
17
18
18
/**
19
19
* built-in validation type, available options: https://github.com/yiminghe/async-validator#type
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ export type ValidateFieldsOptions = {
51
51
declare interface ValidationRule {
52
52
/**
53
53
* validation error message
54
- * @type string
54
+ * @type string | Function
55
55
*/
56
- message ?: string ;
56
+ message ?: string | ( ( ) => string )
57
57
58
58
/**
59
59
* built-in validation type, available options: https://github.com/yiminghe/async-validator#type
You can’t perform that action at this time.
0 commit comments