Welcome Guest, Not a member yet? Register   Sign In
required|max_length is not a valid rule.
#11

(07-09-2021, 09:52 AM)paulbalandan Wrote: Thanks. I'll look into it shortly.

Can you try changing this line in system/Validation/Validation.php ?

https://github.com/codeigniter4/CodeIgni...n.php#L793

to this:

$nonEscapeBracket = '(?: (?<!\\\\)(?:\\\\\\\\)*[\[\]])';

Hi, sorry for the delay, it does not throw error, but does not pass the if. 
PHP Code:
$this->validate($this->validaViatico
Reply
#12

Sorry there was a typo. Can you remove the space after the opening '(?:'.

I'm confused the regex is working on online regex sites but is somehow failing here.
Reply
#13

(07-12-2021, 11:08 AM)paulbalandan Wrote: Sorry there was a typo. Can you remove the space after the opening '(?:'.

I'm confused the regex is working on online regex sites but is somehow failing here.

prints the same error.

Code:
{
    "title": "CodeIgniter\\Validation\\Exceptions\\ValidationException",
    "type": "CodeIgniter\\Validation\\Exceptions\\ValidationException",
    "code": 500,
    "message": "required|max_length is not a valid rule.",
    "file": "/srv/http/trazador/system/Validation/Validation.php",
    "line": 321,
    "trace": [
        {
            "file": "/srv/http/trazador/system/Validation/Validation.php",
            "line": 321,
            "function": "forRuleNotFound",
            "class": "CodeIgniter\\Validation\\Exceptions\\ValidationException",
            "type": "::"
        },
        {
            "file": "/srv/http/trazador/system/Validation/Validation.php",
            "line": 159,
            "function": "processRules",
            "class": "CodeIgniter\\Validation\\Validation",
            "type": "->"
        },
        {
            "file": "/srv/http/trazador/system/Controller.php",
            "line": 183,
            "function": "run",
            "class": "CodeIgniter\\Validation\\Validation",
            "type": "->"
        },
        {
            "file": "/srv/http/trazador/app/Controllers/Viaticos/Ctrl_viaticos.php",
            "line": 265,
            "function": "validate",
            "class": "CodeIgniter\\Controller",
            "type": "->"
        },
        {
            "file": "/srv/http/trazador/system/CodeIgniter.php",
            "line": 928,
            "function": "guardar_viatico",
            "class": "App\\Controllers\\Viaticos\\Ctrl_viaticos",
            "type": "->"
        },
        {
            "file": "/srv/http/trazador/system/CodeIgniter.php",
            "line": 436,
            "function": "runController",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->"
        },
        {
            "file": "/srv/http/trazador/system/CodeIgniter.php",
            "line": 336,
            "function": "handleRequest",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->"
        },
        {
            "file": "/srv/http/trazador/public/index.php",
            "line": 37,
            "function": "run",
            "class": "CodeIgniter\\CodeIgniter",
            "type": "->"
        }
    ]
}
Reply




Theme © iAndrew 2016 - Forum software by © MyBB