add validate pattern function