Mou
Mou

Reputation: 16292

How to customize asp.net MVC validation message position

i am doing MVC model validation through data annotation and my validation message is showing just at right side of input but i want to show it at the below of input box like the screen shot. enter image description here

so just tell me what i need to do without touching html. thanks

Upvotes: 5

Views: 2341

Answers (1)

Sedat Kapanoglu
Sedat Kapanoglu

Reputation: 47680

You can alter field-validation-error and validation-summary-errors classes in CSS to make them reside on a new line. One way is to make them block elements by using display:block style. Here is a sample CSS:

.field-validation-error {
    display: block;
}

Upvotes: 6

Related Questions