Add pattern validation to test model.