Browse Source

Add custom validation for create project form

pull/12/head
Nafies Luthfi 8 years ago
parent
commit
5155fac8fd
  1. 4
      app/Http/Requests/Projects/CreateRequest.php
  2. 9
      resources/lang/de/validation.php
  3. 9
      resources/lang/en/validation.php
  4. 9
      resources/lang/id/validation.php

4
app/Http/Requests/Projects/CreateRequest.php

@ -43,8 +43,8 @@ class CreateRequest extends Request
public function messages() public function messages()
{ {
return [ return [
'customer_name.required_without' => 'Nama Customer Wajib diisi.',
'customer_email.required_without' => 'Email Customer Wajib diisi.',
'customer_name.required_without' => __('validation.project.customer_name.required_without'),
'customer_email.required_without' => __('validation.project.customer_email.required_without'),
]; ];
} }
} }

9
resources/lang/de/validation.php

@ -90,9 +90,12 @@ return [
| |
*/ */
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
'project' => [
'customer_name' => [
'required_without' => 'Customer name is required.',
],
'customer_email' => [
'required_without' => 'Customer email is required.',
], ],
], ],

9
resources/lang/en/validation.php

@ -90,9 +90,12 @@ return [
| |
*/ */
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
'project' => [
'customer_name' => [
'required_without' => 'Customer name is required.',
],
'customer_email' => [
'required_without' => 'Customer email is required.',
], ],
], ],

9
resources/lang/id/validation.php

@ -90,9 +90,12 @@ return [
| |
*/ */
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
'project' => [
'customer_name' => [
'required_without' => 'Nama customer wajib diisi.',
],
'customer_email' => [
'required_without' => 'Email customer wajib diisi.',
], ],
], ],

Loading…
Cancel
Save