/** * Base class for form components that provides helper methods * for rendering errors associated with the form **/ class BaseForm extends React.Component { /** * Returns the JSX required to render a list of errors. * * @returns {*} */ getErrorsElement() { const { errors } = this.props; // Don't render anything if no errors present. if(!errors || !errors.errors || (errors.errors.length == 0)) { return null; } const errorCount = errors.errors.length; const singleError = (errorCount == 1); return (