1

I have a form with multiple fields that are required. Now when I try to save the form and leave it as blank, a validation is displayed.

enter image description here

The validation is correct. However, I have more than 3 input fields that are required. I want to display them all at the same time. How do i do this?

1

I finally found where it can be changed. This is under the Save function. I attached the code below: I just need to change the condition in the for loop from 3 to any number I want.

// Push up to three validation messages out to the user.
        for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
        {
        if ($errors[$i] instanceof Exception)
        {
        $app->enqueueMessage($errors[$i]->getMessage(), 'warning');
        }
        else
        {
        $app->enqueueMessage($errors[$i], 'warning');
        }
        }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.