Note that there are some explanatory texts on larger screens.

plurals
  1. POAsp.Net MVC 4 Regular Express Attribute does not show message of mine
    primarykey
    data
    text
    <p>I am working over an application in Asp.net MVC4.0 where i am Model CountryInformation having the following attributes.</p> <pre><code>[Required(ErrorMessage = "This field is required.")] [Display(Name = "Country Name")] public string CountryName { get; set; } [Required(ErrorMessage = "This field is required.")] [RegularExpression(@"^[+-]?[0-9]{1,9}(?:\.[0-9]{1,6})?$",ErrorMessage = "Input decimal numbers.")] public float Latitude { get; set; } [Required(ErrorMessage = "This field is required.")] //[RegularExpression(@"^[+-]?[0-9]{1,9}(?:\.[0-9]{1,6})?$", ErrorMessage = "Input decimal numbers.")] public float Longitude { get; set; } [Required(ErrorMessage = "This field is required.")] //[RegularExpression(@"^[+-]?[0-9]{1,9}(?:\.[0-9]{1,6})?$", ErrorMessage = "Input decimal numbers.")] [Display(Name = "GMT Offset")] public float GMTOffSet { get; set; } public string Currency { get; set; } </code></pre> <p>Everything is working fine when the model is validated after i input the wrong value for Latitude field i.e. abc not a decimal of course then It doesn't show my Error Message but " The value 'abc' is not valid for Latitude." every in the page source i have seen the value for </p> <pre><code>&lt;input id="Latitude" class="input-validation-error text-box single-line" type="text" value="abc" name="Latitude" data-val-required="This field is required." data-val-regex-pattern="^[+-]?[0-9]{1,9}(?:\.[0-9]{1,6})?$" data-val-regex="Input decimal numbers." data-val-number="The field Latitude must be a number." data-val="true"&gt; </code></pre> <p>The value 'abc' is not valid for Latitude. Please describe that why I am not seeing my message</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload