Skip to content

Custom error message not working? #631

Closed Answered by aasiph
aasiph asked this question in Q&A
Discussion options

You must be logged in to vote

Never mind adding dot * worked..

/**
     * Get the error messages for the defined validation rules.
     * @return array
     */
    public static function messages(): array
    {
        return [
                'gender.*' => 'Please select a valid gender.',
                'first_name.required' => 'Just for required',
                'first_name.*' => 'General error message',
        ];
    }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aasiph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant