$email = 'john@example.com'; $isEmailValid = Validation::email($email); if ($isEmailValid) { echo 'Email is valid'; } else { echo 'Email is not valid'; }
$password = 'Password@123'; $isPasswordValid = Validation::minLength($password, 8); if ($isPasswordValid) { echo 'Password is valid'; } else { echo 'Password is not valid'; }
composer require cakephp/validation