I don't know which one is the best?
do you think it's better to validate user login form
or other forms in controller or it's better to define one class for example 'security class' in model to validation?
or define some classes for validation?
do you know a better choice or good technique?
<?php
class acontroller{
.
.
.
private function loginformAction()
{
$this->actionform='loginform';
$this->errorMsg=array();
if(isset($post)){
if(empty($post('aliasName'))){
...
}else{
...
}
if(empty($post('password'))){
...
}
if(empty($post('re_password'))){
...
}
if(!empty($post('password')) && isset($post('re_password')) ){
...
}
}
$this->render();
}
.
.
.
}