I have just started using mvc razor.
ANd I would like to show validation error messages in red.
Here is my viewmodel.
public class AViewModel
{
[Required(ErrorMessageResourceName = "EmailAddressRequired", ErrorMessageResourceType = typeof(Resources))]
[HomeController.EmailAddressAttribute(ErrorMessageResourceType = typeof(Resources), ErrorMessageResourceName = "EmailAddress_RegularExpression_ErrorMessage")]
public string EmailAddress { get; set; }
[HomeController.LocalizedDisplayNameAttribute("Password", NameResourceType = typeof(Resources))]
[Required(ErrorMessageResourceName = "PasswordRequired", ErrorMessageResourceType = typeof(Resources))]
[DataType(DataType.Password)]
public string Password { get; set; }
[HiddenInput(DisplayValue = false)]
public Guid id { get; set; }
}
My view looks something like this:
<div class="left">
@Html.EditorForModel()
<br />
</div>
And my css looks like this:
.left { float:left; width:430px; margin:0 -480px 0 0;
padding:0 40px 20px 0; border-right:1px solid #DDD;}
What needs to be changed in css?
In side the view I have used @Html.EditerForViewModel(). the validation messages in currently shown in black. is there any to show in red?