Browse Source

Merge pull request #923 from ant-design/chore-form

refactor: make code more robust
pull/928/head
afc163 9 years ago
parent
commit
0be6682252
  1. 2
      components/form/FormItem.jsx
  2. 2
      components/form/demo/validate-customized.md

2
components/form/FormItem.jsx

@ -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';
}
}

2
components/form/demo/validate-customized.md

@ -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…
Cancel
Save