Welcome Guest, Not a member yet? Register   Sign In
How can I add a new value to ruleSets form Mypak(ThirdParty)?
#1

(This post was last modified: 02-09-2022, 06:31 PM by datamweb.)

How can I add a new value to ruleSets?
No editing app file \ Config \ Validation.php.
I want to do this from the app \ ThirdParty \ Mypack folder.
I did the following but it does not work.

//app\ThirdParty\Mypack\Config\MyValidation.php

Code:
<?php

namespace MyNameSpase\Config;

use CodeIgniter\Validation\CreditCardRules;
use CodeIgniter\Validation\FileRules;
use CodeIgniter\Validation\FormatRules;
use CodeIgniter\Validation\Rules;

use CodeIgniter\Config\BaseService;


class MyValidation extends App\Config\Validation
{


    public $ruleSets=[
        // Add Custom Rules
        '\MyNameSpase\Validation\MyCustomRules',
    ];


}
@kilishan ,please help me.
Reply
#2

> No editing app file \ Config \ Validation.php.

You can't.
Reply
#3

(02-18-2022, 11:10 PM)kenjis Wrote: > No editing app file \ Config \ Validation.php.

You can't.

@kenjis, Thank you for your answer. I have learned many things from you.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB