46 lines
1.2 KiB
PHP
46 lines
1.2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Pensare Software.
|
|
* User: Theo Weijmer
|
|
* Date: 10/07/16
|
|
* Time: 13:35
|
|
*/
|
|
|
|
require_once( APPPATH . 'Libraries/Validation/InputValidations/BaseValidation.php' );
|
|
|
|
class UserValidation extends BaseValidation {
|
|
|
|
|
|
protected $validationFields = [
|
|
'firstname' => [
|
|
'validations' => 'required|alphaNumericSpaces',
|
|
'fieldname' => 'firstname'
|
|
],
|
|
'lastname' => [
|
|
'validations' => 'required|alphaNumericSpaces',
|
|
'fieldname' => 'lastname'
|
|
],
|
|
'email' => [
|
|
'validations' => 'required|email|unique',
|
|
'fieldname' => 'email',
|
|
'model' => 'User_model',
|
|
'field' => 'email'
|
|
],
|
|
'username' => [
|
|
'validations' => 'required|alphanumeric|minlength-4|unique',
|
|
'fieldname' => 'username',
|
|
'model' => 'User_model',
|
|
'field' => 'username'
|
|
],
|
|
'hourlyrate' =>[
|
|
'validations' => 'decimal',
|
|
'fieldname' => 'uurtarief'
|
|
]
|
|
];
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
} |