Answer the question
In order to leave comments, you need to log in
Validation against linked table yii2?
There is an input form (model-1), a number is entered in one of the fields, you need to check if there is a record with an ID equal to this number in the associated table (model-2). Is there a built-in validator for this?
Answer the question
In order to leave comments, you need to log in
https://www.yiiframework.com/doc/guide/2.0/en/tuto... - your option with targetClass(targetRelation)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question