I have a table called Contracts that includes the Name and Contact
Information for all my Independent Contractors. Each Independent
Contractor (IC) will have many [work] Schedules. The IC has to submit
a schedule every week, but I do not want to setup a complicated
authentication system that is hard to maintain. So, I’d like to have
a simple form where the ICs must pick their name from a list and
manually type in their own ZIP code to let the program know it is
actually them submitting the form.
My question is how can I validate the form by checking that the ZIP
code matches the name picked (which both reside in my contracts table)
before allowing the IC to create the schedule? I would imagine I would
have to create a custom ‘validate’ method in my Schedules model, but
I’m not sure how to begin.