This is a migrated thread and some comments may be shown as answers.
Change grid validation message
1 Answer 57 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gabe Knight
Top achievements
Rank 1
Gabe Knight asked on 08 Dec 2010, 11:41 AM
I use AjaxBinding in a column bound to a decimal field. When I try to edit and set it to a non numerical value, I get the following "The field ValueA must be a number". How is it possible to change the validation message "The field ValueA must be a number" to a different language or even change it to a custom message? Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Ajay
Top achievements
Rank 1
answered on 24 Jun 2011, 03:26 AM
The attached code used EF4.1

namespace Northwind.Models
  
   {
       using System;
       using System.ComponentModel.DataAnnotations;
       using System.Collections.Generic;
       using System.Linq;
       using System.Web;
       using System.ComponentModel;
       using System.Data.Objects.DataClasses;
  
      [MetadataType(typeof(CustomersMetaData))]
      public partial class Customers : EntityObject
      {  
      }
  
  
         public partial class CustomersMetaData : EntityObject
         {
        [Required(ErrorMessage = "*")]
        [Display(Name = "Company Name")]
        public string CompanyName;
          
        [Required(ErrorMessage = "**")]
        [Display(Name = "Contact Name")]
        public string ContactName;
  
        [ScaffoldColumn(false)]
        public string CustomerID;
       
         [Required]
         [Display(Name = "Country")]
         public string Country;
  
         [Required]
         [Display(Name = "Region")]
         public string Region;
          
   
         
    }
}

Ajay
Tags
Grid
Asked by
Gabe Knight
Top achievements
Rank 1
Answers by
Ajay
Top achievements
Rank 1
Share this question
or