Intervention / validation

Missing Laravel Validation Rules
https://validation.intervention.io
MIT License
590 stars 67 forks source link

How can I overwrite the messages? #4

Closed PanMan closed 9 years ago

PanMan commented 9 years ago

Hi! The package works great for validating IBAN numbers! Thanks! However, is it possible to overwrite the message? setting 'iban' => 'De :attribute is geen geldig IBAN nummer', in resources/lang/en/validation.php doesn't work, and neither does passing a custom message to a validator? This does work for the built-in validators. Thanks!

olivervogel commented 9 years ago

I added the possibility to overwrite error messages in 79e0eb78ae6409dffda25d878adfd4499e51006f.

Add the corresponding key to /resources/lang/<language>/validation.php like this:

// example
'iban' => 'Please enter IBAN number!',

Or add your custom messages directly to the validator like described in the docs.

PanMan commented 9 years ago

Whow, thanks for the quick response! This works great!

PanMan commented 9 years ago

I created a quick pull req to add this to the readme.