在我们的人力资源系统中,我把验证用户必须至少放8个字母。但如果他们不把他们不能打卡,但他们在做什么是他们把8的白色空间,他们可以在冲:(所以我想限制他们把注意避免空白PHP表单验证最小字符需要避免空格?
if(empty($openPunch)){
$currentTime = $req->time;
if (strtotime($currentTime) >= strtotime('09:30')){
if(strlen($req->note) < 8){
$time = (strtotime($currentTime) - strtotime('09:30'));
$minutes = floor($time/60);
$minute = $minutes%60;
$hours = floor($time/3600);
return new IceResponse(IceResponse::ERROR,"Today you are late ".$hours.":".$minute." Hours You Can't Punch in without Fill the Correct Reason");
}
}
$openPunch = new Attendance();
}
这就好比修理化油器用绷带。用户会注意到他们可以放8个点或其他任何东西。 –
为什么它被标记为JavaScript?你是否也想执行客户端检查? – Arnauld