mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
refactor: make code more robust
This commit is contained in:
parent
ecc2b6fe8c
commit
366edc023a
@ -48,7 +48,7 @@ class FormItem extends React.Component {
|
||||
return 'validating';
|
||||
} else if (!!getFieldError(field)) {
|
||||
return 'error';
|
||||
} else if (getFieldValue(field)) {
|
||||
} else if (getFieldValue(field) !== undefined) {
|
||||
return 'success';
|
||||
}
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ let Demo = React.createClass({
|
||||
this.getPassStrenth(value, 'pass');
|
||||
|
||||
if (form.getFieldValue('pass')) {
|
||||
form.validateFields(['rePass']);
|
||||
form.validateFields(['rePass'], { force: true });
|
||||
}
|
||||
|
||||
callback();
|
||||
|
Loading…
Reference in New Issue
Block a user