Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

ErrorMessage for decimal in entity-framework-core

$
0
0

Hello im trying to customize error Message for decimal but it look like it is not work & im just getting the default error MSG , it's probably out of the box gut I just cant find it .

Else > how can I overwrite  the default ? 

Code example  :

using System;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using Market.Models;

    namespace Market.ViewModels
    {
        public class QuettaCatViewModel
    [Required(ErrorMessage = "Please fill Amount ")] //This Work fine

            public int Qentity { get; set; }
     [Required(ErrorMessage = "Value cant empty")] // Not Fine Getting the default Msg 
            //[RegularExpression(@"^\d+.\d{0,2}$", ErrorMessage = "Value cant be empty")] //// Not Fine Getting the default Msg + The RegularExpression error Msg  
            public decimal Bedget { get; set; }

thanks


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>