Update ValidationRule message type (#3163)

pull/3414/head
Emmanuel Pastor 2020-11-13 04:08:27 +01:00 committed by GitHub
parent d552a41e96
commit 388ed15e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ export const FormProps = {
export const ValidationRule = {
/** validation error message */
message: PropTypes.string,
message: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
/** built-in validation type, available options: https://github.com/yiminghe/async-validator#type */
type: PropTypes.string,
/** indicates whether field is required */

View File

@ -75,7 +75,7 @@ export const FormProps = {
export const ValidationRule = {
/** validation error message */
message: PropTypes.string,
message: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
/** built-in validation type, available options: https://github.com/yiminghe/async-validator#type */
type: PropTypes.string,
/** indicates whether field is required */

View File

@ -11,9 +11,9 @@ declare interface ValidationRule {
trigger?: string;
/**
* validation error message
* @type string
* @type string | Function
*/
message?: string;
message?: string | (() => string)
/**
* built-in validation type, available options: https://github.com/yiminghe/async-validator#type

View File

@ -51,9 +51,9 @@ export type ValidateFieldsOptions = {
declare interface ValidationRule {
/**
* validation error message
* @type string
* @type string | Function
*/
message?: string;
message?: string | (() => string)
/**
* built-in validation type, available options: https://github.com/yiminghe/async-validator#type