diff --git a/src/components/MagicCodeInput.js b/src/components/MagicCodeInput.js index b33e686001db..a9505e829c1e 100644 --- a/src/components/MagicCodeInput.js +++ b/src/components/MagicCodeInput.js @@ -38,6 +38,9 @@ const propTypes = { /** Function to call when the input is submitted or fully complete */ onFulfill: PropTypes.func, + + /** Specifies if the input has a validation error */ + hasError: PropTypes.bool, }; const defaultProps = { @@ -50,6 +53,7 @@ const defaultProps = { innerRef: null, onChangeText: () => {}, onFulfill: () => {}, + hasError: false, }; /** @@ -263,7 +267,11 @@ function MagicCodeInput(props) { key={index} style={[styles.w15]} > - + {decomposeString(props.value)[index] || ''}