public bool TryConstraint(IHttpContext context, object value) { return value == null || regex.IsMatch(value.ToString()); } }