mvanduijker / laravel-model-exists-rule

Laravel validation rule to check if a model exists
MIT License
22 stars 1 forks source link

How edit error message ? #6

Closed SupchickCode closed 1 year ago

SupchickCode commented 1 year ago

I have this rule:

image

And validation error message looks like this validation.model_exists

I try to edit this message like this image

But nothing helps me

mvanduijker commented 1 year ago

In this test it's described how to do the translations https://github.com/mvanduijker/laravel-model-exists-rule/blob/master/tests/Unit/ModelExistsTest.php#L72 will that work for you?

I do see that the default translation in https://github.com/mvanduijker/laravel-model-exists-rule/blob/master/resources/lang/en/modelExists.php is incorrect.

But if you want completely different translations per rule, I think we have to make a change in this package. But I have to look it up.

SupchickCode commented 1 year ago

Thank u for reply

jjjrmy commented 1 year ago

bump for this, still having this issue