0
votes

I have a class order which contains OrderNo property. I have just set Required field validation with set necessary message.

     private string _OrderNo;
    [Required(ErrorMessage="Order No Is Required")]
    public string OrderNo
    {
        get { return _OrderNo; }
        set { _OrderNo = value; }
    }

But generates metadata does not contain given error message. OrderNo meta data is ---- {"name":"OrderNo","type":"Edm.String","maxLength":"Max","fixedLength":"false","unicode":"true","nullable":"false"}

1

1 Answers

0
votes

Breeze client metadata schema doesn't currently support custom ErrorMessage from EF validation attributes as you have proposed here. You have to modify the client model's validation message if you want to customize it. The following Breeze validation doc should help you get started.

Hope this helps.