I am using a 'unique' validation Rule within Laravel, which is currently within a FormRequest. I'm trying to customise the message returned from this Rule and I can't see in the documentation where Laravel generates this message.
I realise it is possible to fully extend the Validator and create my own custom one, but all I need to do is customise the 'Unique' rule message. The class in the documentation is here:
https://github.com/laravel/framework/blob/5.3/src/Illuminate/Validation/Rules/Unique.php
any pointers on where internally this message is generated? For reference this is the current output:
{
"message": "422 Unprocessable Entity",
"errors": {
"user_id": [
"The user id has already been taken."
]
},
"status_code": 422
}