lundi 26 mars 2018

How to validate an unknown number of fields in a Larvel form

I'm using Laravel 5.4, and have a form that's populated with questions from a database, with each question requiring a 'score' using radio buttons valued 1 thru 10. I need to accommodate an unknown number of questions, and I need validation to test that all questions have a score selected. All the radio button groups are are named q_ followed by the question_id (e.g. q_1, q_2, etc). I suppose this could all be done manually, but Laravel is such a powerful framework I have to think there's a "Laravel" way of doing this. Anyone have any suggestions?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire