mirror of
https://github.com/10h30/Test-Laravel-Validation.git
synced 2026-07-19 14:53:12 +09:00
Task 8 - customize validation messages
This commit is contained in:
@@ -88,3 +88,11 @@ Test method `test_update_forbidden_field()`.
|
||||
|
||||
---
|
||||
|
||||
## Task 8. Customize Validation Messages.
|
||||
|
||||
In `app/Http/Controllers/BuildingController.php` file, in `store` method, the code uses `StoreBuildingRequest` Form Request class. Change that class to customize the validation rule for "name" field as "required", to show message "Please enter the name" instead of the default "The field name is required".
|
||||
|
||||
Test method `test_custom_error_message()`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user