Пример #1
0
 /// <summary>
 /// Adds the field error.
 /// </summary>
 /// <param name="fieldName">Name of the field.</param>
 /// <param name="message">The message.</param>
 /// <returns></returns>
 public void AddFieldError(string fieldName, string message)
 {
     Success     = false;
     FieldErrors = FieldErrors.Concat(new[] { new FieldError()
                                              {
                                                  FieldName = fieldName, ErrorMessage = message
                                              } }).ToArray();
 }
Пример #2
0
 public JsonResultEntry AddFieldError(string fieldName, string message)
 {
     Success     = false;
     FieldErrors = FieldErrors.Concat(new[] { new FieldError()
                                              {
                                                  FieldName = fieldName, ErrorMessage = message
                                              } }).ToArray();
     return(this);
 }