react-google-forms-hooks icon indicating copy to clipboard operation
react-google-forms-hooks copied to clipboard

Add validation and visibility on errors

Open mikemajara opened this issue 2 years ago • 5 comments

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

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 ☝️

mikemajara avatar Feb 04 '22 16:02 mikemajara