0

For example store validation presence settings in db in oder to let users change attributes they want to be required or not to.

If it’s not, maybe there are other ways to solve the issue.

gmrash
  • 650
  • 7
  • 15
  • Are you talking about conditionally applying ``:presence`` validation on a model? – rmlockerd Jul 22 '20 at 02:48
  • I’m talking about giving customers ability to choose which fields they want to have required in the form and which not to. – gmrash Jul 22 '20 at 03:42

1 Answers1

0

This answer could give you a shot

BUT

If your form isn't an model belonging to the user, I think you should start to consider implementing this new feature. Unless you want to store some variables on you user's table for a static application form. Doing something like :boolean => field_one_required is strongly not recommended.

DR7
  • 129
  • 7