NAN exception handled for patternValidation