15 lines
401 B
SQL
15 lines
401 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`checkPrintableChars`(
|
|
vString VARCHAR(255)
|
|
) RETURNS tinyint(1)
|
|
DETERMINISTIC
|
|
BEGIN
|
|
/**
|
|
* Validates whether the input string contains only printable characters
|
|
* and Spanish special characters (such as ¡, ÿ, etc.).
|
|
*
|
|
* @vString string to check
|
|
*/
|
|
RETURN vString REGEXP '^[ -~¡-ÿ]*$';
|
|
END$$
|
|
DELIMITER ; |