Change field name


(Faizan Khattak) #1

[[‘name’], ‘unique’, ‘message’ => ‘This Make already exists’],

output

[

{

"field": "name",


"message": "This Make already exists"

}

]

how i change field?

Expected Result

[

{

"field": "make",


"message": "This Make already exists"

}

]


(Alirz23) #2

provided you have a field with that name in the database, you can change the field name in the rules like so


[['make'], 'unique', 'message' => 'This Make already exists'],