Commit 5e93d833 by Teeradone-PIM

teeradone: register

parent 2905751c
......@@ -71,51 +71,51 @@ class UsersTable extends Table {
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator) {
$validator
->allowEmpty('id', 'create');
// $validator
// ->allowEmpty('id', 'create');
$validator
->scalar('username')
->allowEmpty('username');
// $validator
// ->scalar('username')
// ->allowEmpty('username');
$validator
->scalar('password')
->allowEmpty('password');
// $validator
// ->scalar('password')
// ->allowEmpty('password');
$validator
->integer('point')
->allowEmpty('point');
// $validator
// ->integer('point')
// ->allowEmpty('point');
$validator
->boolean('is_used')
->allowEmpty('is_used');
// $validator
// ->boolean('is_used')
// ->allowEmpty('is_used');
$validator
->scalar('dynamic_key')
->allowEmpty('dynamic_key');
// $validator
// ->scalar('dynamic_key')
// ->allowEmpty('dynamic_key');
$validator
->date('dynamic_key_expiry')
->allowEmpty('dynamic_key_expiry');
// $validator
// ->date('dynamic_key_expiry')
// ->allowEmpty('dynamic_key_expiry');
$validator
->scalar('token')
->allowEmpty('token');
// $validator
// ->scalar('token')
// ->allowEmpty('token');
$validator
->date('token_expiry')
->allowEmpty('token_expiry');
// $validator
// ->date('token_expiry')
// ->allowEmpty('token_expiry');
$validator
->requirePresence('created_by', 'create')
->notEmpty('created_by');
// $validator
// ->requirePresence('created_by', 'create')
// ->notEmpty('created_by');
$validator
->allowEmpty('modified_by');
// $validator
// ->allowEmpty('modified_by');
$validator
->scalar('pin_code')
->allowEmpty('pin_code');
// $validator
// ->scalar('pin_code')
// ->allowEmpty('pin_code');
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