Suppose I have a field name id and I want the user to enter some integer in the id field but at the same time I want to check that id against the database whether it exists or not. If it exists then it should show some error.
Is there a function to achieve this in Yii 2.0?
Any help would be greatly appreciated. Thank you!