Commit 5e93d833 by Teeradone-PIM

teeradone: register

parent 2905751c
...@@ -71,51 +71,51 @@ class UsersTable extends Table { ...@@ -71,51 +71,51 @@ class UsersTable extends Table {
* @return \Cake\Validation\Validator * @return \Cake\Validation\Validator
*/ */
public function validationDefault(Validator $validator) { public function validationDefault(Validator $validator) {
$validator // $validator
->allowEmpty('id', 'create'); // ->allowEmpty('id', 'create');
$validator // $validator
->scalar('username') // ->scalar('username')
->allowEmpty('username'); // ->allowEmpty('username');
$validator // $validator
->scalar('password') // ->scalar('password')
->allowEmpty('password'); // ->allowEmpty('password');
$validator // $validator
->integer('point') // ->integer('point')
->allowEmpty('point'); // ->allowEmpty('point');
$validator // $validator
->boolean('is_used') // ->boolean('is_used')
->allowEmpty('is_used'); // ->allowEmpty('is_used');
$validator // $validator
->scalar('dynamic_key') // ->scalar('dynamic_key')
->allowEmpty('dynamic_key'); // ->allowEmpty('dynamic_key');
$validator // $validator
->date('dynamic_key_expiry') // ->date('dynamic_key_expiry')
->allowEmpty('dynamic_key_expiry'); // ->allowEmpty('dynamic_key_expiry');
$validator // $validator
->scalar('token') // ->scalar('token')
->allowEmpty('token'); // ->allowEmpty('token');
$validator // $validator
->date('token_expiry') // ->date('token_expiry')
->allowEmpty('token_expiry'); // ->allowEmpty('token_expiry');
$validator // $validator
->requirePresence('created_by', 'create') // ->requirePresence('created_by', 'create')
->notEmpty('created_by'); // ->notEmpty('created_by');
$validator // $validator
->allowEmpty('modified_by'); // ->allowEmpty('modified_by');
$validator // $validator
->scalar('pin_code') // ->scalar('pin_code')
->allowEmpty('pin_code'); // ->allowEmpty('pin_code');
return $validator; return $validator;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment