diff --git a/CHANGELOG.md b/CHANGELOG.md index 391459e7fc5..9629e439cea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [`master`](https://github.com/elastic/eui/tree/master) - Added `status` prop to `EuiStep` for additional styling ([#673](https://github.com/elastic/eui/pull/673)) +- `EuiForm` and `EuiFormRow` now accept nodes for `errors` prop ([#685](https://github.com/elastic/eui/pull/685)) **Bug fixes** diff --git a/src/components/form/form.js b/src/components/form/form.js index 41fccf7fd20..0af76cc4d7b 100644 --- a/src/components/form/form.js +++ b/src/components/form/form.js @@ -54,5 +54,5 @@ export const EuiForm = ({ EuiForm.propTypes = { isInvalid: PropTypes.bool, - error: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), + error: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]), }; diff --git a/src/components/form/form_row/form_row.js b/src/components/form/form_row/form_row.js index fefd9874166..2ef39080da0 100644 --- a/src/components/form/form_row/form_row.js +++ b/src/components/form/form_row/form_row.js @@ -150,7 +150,7 @@ EuiFormRow.propTypes = { label: PropTypes.node, id: PropTypes.string, isInvalid: PropTypes.bool, - error: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]), + error: PropTypes.oneOfType([PropTypes.node, PropTypes.arrayOf(PropTypes.node)]), helpText: PropTypes.node, hasEmptyLabelSpace: PropTypes.bool, fullWidth: PropTypes.bool,