• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set Validation Labels on Model

#1
Hello, CodeIgniters!

How to set Validation Labels on Model?

Thanks! ! !
Reply

#2
(02-13-2020, 12:43 PM)falko Wrote: Hello, CodeIgniters!

How to set Validation Labels on Model?

Thanks! ! !
PHP Code:
class Users extends \CodeIgniter\Model
{        
    
protected $validationRules = [
        'username' => [
            'label' => 'Usuario'
            'rules' => 'required|alpha_numeric_space|min_length[3]|max_length[16]|is_unique[users.username,id,{id}]',
        ],
    ];

Reply

#3
(02-19-2020, 07:45 AM)elephpantech Wrote:
PHP Code:
class Users extends \CodeIgniter\Model
{        
    
protected $validationRules = [
        'username' => [
            'label' => 'Usuario'
            'rules' => 'required|alpha_numeric_space|min_length[3]|max_length[16]|is_unique[users.username,id,{id}]',
        ],
    ];


Thank you! It solved my question
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.