Welcome Guest, Not a member yet? Register   Sign In
Form Validation Config File
#1

(This post was last modified: 04-19-2020, 12:29 PM by jreklund.)

Hello, I am new on this forum
I have problem with creating a form_validation.php file for entire application validation
I want custom error message for regex_match but. I got Default Error Validation Message

PHP Code:
//form validation regular expression
defined('NAME_EXP') OR define('NAME_EXP''[a-zA-Z .\-]+$');

'applicant' => [
    'field' => 'full_name',
    'label' => 'Applicant Name',
    'rules' => 'trim|required|max_length[255]|min_length[3]|regex_match[/' NAME_EXP '/]',
    'errors' => [
        'regex_match[/' NAME_EXP '/]' => "The %s field may only contain Alphabetic characters, Fullstops(.), Hyphens(-) and spaces( )."
    ]

Reply


Messages In This Thread
Form Validation Config File - by hafijul233 - 04-19-2020, 12:21 PM
RE: Form Validation Config File - by jreklund - 04-19-2020, 01:00 PM
RE: Form Validation Config File - by hafijul233 - 04-19-2020, 01:10 PM



Theme © iAndrew 2016 - Forum software by © MyBB