Skip to content

Commit

Permalink
chore: update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Jun 29, 2023
1 parent bcfea99 commit 4267a06
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/06_form_controls/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ const Field = () => {
onFocus={handleOnFocus('field')}
onBlur={handleOnBlur('field')}
/>
<p>{isValid ? 'Valid' : `${fieldErrors.field}`}</p>
<p>
isValid or Field Error:{' '}
{isValid ? (
<span style={{ color: 'green' }}>Valid</span>
) : (
`${fieldErrors.field}`
)}
</p>
<p>{touched.field ? 'Touched' : 'Untouched'}</p>
<p>{focused.field ? 'Focused Field' : 'Not in focus'}</p>
<p>Form Error: {error?.toString()}</p>
Expand Down

0 comments on commit 4267a06

Please sign in to comment.