react-google-forms-hooks
react-google-forms-hooks copied to clipboard
Add validation and visibility on errors
The library as is doesn't show some (if not all) errors.
Given Google manages that within the browser we need to parse that out of the form-raw.json
and add it to the validation object available in react-hook-form to validate previous to submit.
I've been exploring how this can be done (check in my fork's master)
![image](https://user-images.githubusercontent.com/15649320/152566675-23ef9971-f05c-437a-bd77-bf548a3ed0fb.png)
This would be the list for Short Answers, which would be the first thing I'd focus on
- Number
- [x] gt
- [x] gte
- [x] lt
- [x] lte
- [x] eq
- [x] neq
- [x] between
- [x] not between
- [x] is number
- [x] whole number
- Text
- [x] Contains
- [x] Doesn’t contain
- [x] Email
- [x] URL
- Length
- [x] Max char count
- [x] Min char count
- Regular Expression
- [x] Contains
- [x] Doesn’t contain
- [x] Matches
- [x] Doesn’t match
- Long text
- [x] Length ☝️
- [x] Regular Expression ☝️