Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* An error message renderer, Should return a `ReactElement`
* ```
* function(
* message: string,
* idx: number,
* errors: array
* ) -> ReactElement
* ```
*/
formatMessage: PropTypes.func.isRequired,
/**
* A DOM node tag name or Component class the Message should render as.
*/
as: elementType.isRequired,
/**
* A css class that should be always be applied to the Summary container.
*/
errorClass: PropTypes.string,
/**
* Specify a group to show errors for, if empty all form errors will be shown in the Summary.
*/
group: PropTypes.string,
}
static defaultProps = {
as: 'ul',
formatMessage: (message, idx) => <li>{message}</li>,
}