diff --git a/src/RTEX/Classes/Validate.php b/src/RTEX/Classes/Validate.php index 92f7b8d..89639c8 100644 --- a/src/RTEX/Classes/Validate.php +++ b/src/RTEX/Classes/Validate.php @@ -16,7 +16,7 @@ { try { - Utilities::determineType($type); + Utilities::getType($type); } catch(Exception $e) { @@ -26,4 +26,16 @@ return true; } + + /** + * Validates the input with a regex pattern + * + * @param string $input + * @param string $pattern + * @return bool + */ + public static function validateRegex(string $input, string $pattern): bool + { + return preg_match($pattern, $input) === 1; + } } \ No newline at end of file