ProcessMaker-MA "2184 Fields Validation Layer"
- Se ha implementado la clase "class.fieldValidator.php", la misma incluye metodos de validacion de valor de variables - La clase "FieldValidator" valida valores como: numeros (int, real), cadenas (url, email, ip). Tambien valida valores por conjunto - Se ha implementado las pruebas unitarias para esta clase en el archivo "classFieldValidatorTest.php"
This commit is contained in:
@@ -56,7 +56,7 @@ class FieldValidator
|
||||
*/
|
||||
public static function isUrl($url)
|
||||
{
|
||||
return (preg_match("/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i", $url))? true : false;
|
||||
return (preg_match("/(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\/+\\@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i", $url))? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user