2

I have following forms

{{ Form::text("theme[header_color]", '', []) }}
{{ Form::text("theme[bg_color]", '', []) }}
{{ Form::text("theme[text_color]", '', []) }}

I added following rules in request method.

theme[text_color]="required",
theme[bg_color]="required",
theme[text_color]="required"

I enter value in all field but still getting required validation error.

Please help have a look and help us.

THanks

1

1 Answer 1

1

Try this code does this help

        $rules = array(
            'theme.text_color' => 'required',
            'theme.bg_color' => 'required',
            'theme.header_color' => 'required',
        );
        $messages = [
            'theme.text_color.required' => 'Please add Text Color.',
            'theme.bg_color.required' => 'Please add Text Color.',
            'theme.header_color.required' => 'Please add Header Color.',
          ];
Sign up to request clarification or add additional context in comments.

1 Comment

i tried but now validation not fired even if value is empty.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.