Welcome Guest, Not a member yet? Register   Sign In
Custom Validation Messages not shown
#3

Try:

PHP Code:
        $rules = [
            'sonde_nom' => [
                'label' => 'Nom',
                'rules' => 'required|min_length[3]',
                'errors' => [
                    'required' => 'Le champ {field} est obligatoire.',
                    'min_length' => 'Le champ {field} doit contenir au moins {param} caractères.',
                ],
            ],
        ];

        if (! $this->validate($rules)) {
            // The validation failed.
            dd($this->validator->getErrors());
        
Reply


Messages In This Thread
Custom Validation Messages not shown - by dipi66 - 08-02-2024, 01:42 PM
RE: Custom Validation Messages not shown - by kenjis - 08-02-2024, 04:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB