Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 5
Contacts
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 5
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 5
<?php namespace App\Models;
use Framework\MVC\Model;
class Contacts extends Model
{
    protected $allowedColumns = [
        'email',
        'name',
        'message',
    ];
    protected $useDatetime = true;
    protected $validationLabels = [
        'email' => 'Email',
        'name' => 'Name',
        'message' => 'Message',
    ];
    protected $validationRules = [
        'email' => 'required|email',
        'name' => 'required|latin:true|minLength:5|maxLength:32',
        'message' => 'required|minLength:10|maxLength:1024',
    ];
    public function __construct()
    {
        $this->validationLabels['email'] = lang('contact.email');
        $this->validationLabels['name'] = lang('contact.name');
        $this->validationLabels['message'] = lang('contact.message');
    }
}