mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
Remove rc-form-validation from deps completely
This commit is contained in:
parent
3da8ea2412
commit
596fbc80d5
@ -1,25 +1,15 @@
|
||||
import React from 'react';
|
||||
import Validation from 'rc-form-validation';
|
||||
import warning from 'warning';
|
||||
|
||||
export default class AntValidation extends React.Component {
|
||||
validate(callback) {
|
||||
this.refs.validation.validate(callback);
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.refs.validation.reset();
|
||||
}
|
||||
|
||||
forceValidate(fields, callback) {
|
||||
this.refs.validation.forceValidate(fields, callback);
|
||||
}
|
||||
|
||||
render() {
|
||||
warning(false, '`Validation` is deprecated, please use `Form` which has supported validation after antd@0.12.0.');
|
||||
return <Validation {...this.props} ref="validation" />;
|
||||
warning(false, '`Validation` is removed, please use `Form` which has supported validation after antd@0.12.0,' +
|
||||
' or you can just import Validation from \'rc-form-validation\' for compatibility');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
AntValidation.Validator = Validation.Validator;
|
||||
AntValidation.FieldMixin = Validation.FieldMixin;
|
||||
AntValidation.Validator = () => {};
|
||||
AntValidation.FieldMixin = {
|
||||
setField() {},
|
||||
};
|
||||
|
@ -46,7 +46,6 @@
|
||||
"rc-dialog": "~5.4.0",
|
||||
"rc-dropdown": "~1.4.3",
|
||||
"rc-form": "~0.14.0",
|
||||
"rc-form-validation": "~2.5.0",
|
||||
"rc-input-number": "~2.5.0",
|
||||
"rc-menu": "~4.10.2",
|
||||
"rc-notification": "~1.3.1",
|
||||
|
Loading…
Reference in New Issue
Block a user