I recently had to add a signup form to one of my Redwood apps. I hadn’t done much custom validation with react-hook-form before, and there isn’t much written about RW’s forms at all (besides the tutorials and docs). So, to hopefully save someone else some time, I did this write up.
The main thing you’ll learn is how to set up validation for a “confirm password” field, and I also show the autoComplete="new-password" attribute that I don’t think everyone knows about.
Definitively very interesting tutorial (assessment based on its description). IAM (Identity and Access Management) is one of my favorite topics, that I have yet to pursue in the context of RedwoodJS applications. Thank you @Tobbe
Awesome, I always love when you put some writing out @Tobbe! Could be potential threetorial material, right? Also quick tip, I’d probably take a code block like this:
I would possibly break down some of the later ones as well, this stuff really comes down to taste more than anything else but I usually optimize for more space when possible because you want people to really read every line of code.
Another example would be I’d possible change this:
Thanks for your kind words @ajcwebdev and for your input too. Line breaks/line length I just leave up to prettier.js to worry about. But totally should have grouped the label+input with blank lines between in the first couple of code snippets.
Code updated and pushed. Just waiting for GitHub to build it and publish. Thanks again Anthony.