Skip to content

Commit 875376b

Browse files
Add validation for form data minimum character length
1 parent b2d3e10 commit 875376b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/views/resources/pages/create/can-validate-create-form-data.blade.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@
1515
@foreach($getResourceFormFieldsByRulePrefix('max') as $key => $field)
1616
'`{{ $key }}` is max {{ $getRuleValue($field, 'max') }} characters' => [['{{ $key }}' => Illuminate\Support\Str::random({{ $getRuleValue($field, 'max') + 1 }})], ['{{ $key }}' => 'max']],
1717
@endforeach
18+
@foreach($getResourceFormFieldsByRulePrefix('min') as $key => $field)
19+
'`{{ $key }}` is min {{ $getRuleValue($field, 'min') }} characters' => [['{{ $key }}' => Illuminate\Support\Str::random({{ $getRuleValue($field, 'min') - 1 }})], ['{{ $key }}' => 'min']],
20+
@endforeach
1821
]);

0 commit comments

Comments
 (0)