medayz
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
components/form/demo/customized-form-controls.md
|
|
@ -81,14 +81,14 @@ const PriceInput: React.FC<PriceInputProps> = ({ value = {}, onChange }) => { |
|
|
|
|
|
|
|
const Demo = () => { |
|
|
|
const onFinish = values => { |
|
|
|
console.log('Received values of form: ', values); |
|
|
|
console.log('Received values from form: ', values); |
|
|
|
}; |
|
|
|
|
|
|
|
const checkPrice = (rule, value) => { |
|
|
|
if (value.number > 0) { |
|
|
|
return Promise.resolve(); |
|
|
|
} |
|
|
|
return Promise.reject('Price must greater than zero!'); |
|
|
|
return Promise.reject('Price must be greater than zero!'); |
|
|
|
}; |
|
|
|
|
|
|
|
return ( |
|
|
|