Class RegexpValidator


  • public class RegexpValidator
    extends Object
    • Constructor Detail

      • RegexpValidator

        public RegexpValidator()
    • Method Detail

      • throwIfPatternInvalid

        public static Pattern throwIfPatternInvalid​(String pattern)
                                             throws ValidationException

        Tries to compile the passed regular expression pattern.

        This method will throw specified exception if passed pattern fails to compile.

        Parameters:
        pattern - The pattern to validate.
        Throws:
        ValidationException - Thrown in case there was a problem compiling passed pattern.