Managing the case sensitivity for a unique field in symfony

  Kiến thức lập trình

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.

i have tried making my own custom contraint but it didnt work.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT