From 112f78c1deb0f5f85df40d0fe2b71f750e8e3432 Mon Sep 17 00:00:00 2001 From: Jose Pabl Domingo Aramburo Sanchez Date: Thu, 9 Aug 2018 22:48:42 -0600 Subject: [PATCH] [del] Old asserts --- api-payroll/src/service/Asserts.php | 76 ----------------------------- 1 file changed, 76 deletions(-) diff --git a/api-payroll/src/service/Asserts.php b/api-payroll/src/service/Asserts.php index 9f9b96d..6ab7d77 100644 --- a/api-payroll/src/service/Asserts.php +++ b/api-payroll/src/service/Asserts.php @@ -45,81 +45,5 @@ class Asserts{ throw new Exception($errorMessage); } } - - /** - * @param $string - * @throws Exception - */ - function userName($string){ - $validateFirstName = v::stringType()->notEmpty()->length(1, 50)->validate($string); - - if(!$validateFirstName){ - throw new Exception('The user name must be a string between 1 and 50 characters'); - } - } - - /** - * @param $string - * @throws Exception - */ - function password($string){ - $validateFirstName = v::stringType()->notEmpty()->length(1, 50)->validate($string); - - if(!$validateFirstName){ - throw new Exception('The password must be a string between 1 and 50 characters'); - } - } - - /** - * @param $string - * @throws Exception - */ - function firstName($string){ - $validateFirstName = v::stringType()->notEmpty()->length(1, 100)->validate($string); - - if(!$validateFirstName){ - throw new Exception('The first name must be a string between 1 and 100 characters'); - } - } - - /** - * @param $string - * @throws Exception - */ - function middleName($string){ - if(!v::stringType()->notEmpty()->length(1, 100)->validate($string)){ - throw new Exception('The middle name must be a string between 1 and 100 characters'); - } - } - - /** - * @param $string - * @throws Exception - */ - function birthDate($string){ - if(!v::date('Y-m-d')->notEmpty()->validate($string)){ - throw new Exception('The birth date must be in the yyyy-mm-dd format'); - } - } - - /** - * @param $string - * @throws Exception - */ - function email($string){ - if(!v::stringType()->notEmpty()->length(1, 100)->validate($string)){ - throw new Exception('The email must be a string between 1 and 100 characters'); - } - } - - /** - * @param $string - * @throws Exception - */ - function phone($string){ - if(!v::digit()->notEmpty()->length(10, 10)->validate($string)){ - throw new Exception('The phone must be a numeric value of 10 digits'); - } - } } ?>