Relative Content

Tag Archive for phpsymfonyconstraints

Managing the case sensitivity for a unique field in symfony

I have a form where there is one field “place” and I have used UniqueEntity to make that field unique. But the issue I’m currently facing is that if the user types the same place but changes just the case of their input the form will submit and add the new input in the db. This is not what I want it should display an error message that this place is already being used and they need to type different one regardless if its in upper or lower case.

Managing the case sensitivity for a unique field in symfony

I have a form where there is one field “place” and I have used UniqueEntity to make that field unique. But the issue I’m currently facing is that if the user types the same place but changes just the case of their input the form will submit and add the new input in the db. This is not what I want it should display an error message that this place is already being used and they need to type different one regardless if its in upper or lower case.