Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Add nonblocking as default for getCriteriaSet
Browse files Browse the repository at this point in the history
  • Loading branch information
guerrato committed Feb 17, 2022
1 parent 7471007 commit 9d1c1d6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib/hooks/useInputValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ const handleResponse = (
message = !isEmpty(validMessage) ? validMessage : ''
}

// if (!isValid && nonBlocking) {
// type = 'warning'
// }

const icon = getValidationIcon(type)

return {
Expand Down Expand Up @@ -73,7 +69,8 @@ const getCriteriaSet = (props: InputProps) => {
invalidMessage: 'Please fill with a valid e-mail address',
invalidResponseType: 'warning',
validResponseType: 'success',
condition: { type: 'email' }
condition: { type: 'email' },
nonBlocking: false
},
...criteriaSet
]
Expand All @@ -88,7 +85,8 @@ const getCriteriaSet = (props: InputProps) => {
invalidMessage: 'Please fill in this field',
invalidResponseType: 'error',
validResponseType: 'success',
condition: { type: 'required' }
condition: { type: 'required' },
nonBlocking: false
},
...criteriaSet
]
Expand Down

0 comments on commit 9d1c1d6

Please sign in to comment.