Skip to content

Commit

Permalink
Fix errors prop types
Browse files Browse the repository at this point in the history
  • Loading branch information
kowczarz committed Oct 13, 2023
1 parent 19062e6 commit d99fa21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Form/FormWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import SafeAreaConsumer from '../SafeAreaConsumer';
import ScrollViewWithContext from '../ScrollViewWithContext';

import stylePropTypes from '../../styles/stylePropTypes';
import errorsPropType from './errorsPropType';

const propTypes = {
/** A unique Onyx key identifying the form */
Expand All @@ -36,7 +37,7 @@ const propTypes = {
isLoading: PropTypes.bool,

/** Server side errors keyed by microtime */
errors: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]))])),
errors: errorsPropType,

/** Field-specific server side errors keyed by microtime */
errorFields: PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)),
Expand All @@ -59,7 +60,7 @@ const propTypes = {
/** Custom content to display in the footer after submit button */
footerContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),

errors: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]))])).isRequired,
errors: errorsPropType.isRequired,

inputRefs: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])).isRequired,
};
Expand Down

0 comments on commit d99fa21

Please sign in to comment.