Answer the question
In order to leave comments, you need to log in
How to make form fields required without specifying the rules in the model?
There is a model for working with a specific table in the database. It defines additional fields for one of the forms. This model is used simultaneously in 2 versions: in the form with additional fields and in the form without them (ActiveForm). For additional fields, I need to specify that they are required (attribute required). But I can't do it in the rules, otherwise in the 2nd case the form cannot be saved. How it is possible to make fields obligatory "on the fly" not to crutch once again? What are the options for this and how to use them in ActiveField?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question