Questions tagged [validationmessage]

37 questions
0
votes
1 answer

MVC 5 model validation message not correctly displaying

I am coding an MVC 5 internet application and I have a question in regards to validation on a field in a view model. Here is my view model field: [Display(Name = "Latitude")] [Required(ErrorMessage = "Please enter a valid latitude.")] public double…
0
votes
2 answers

Multiple textboxfor, same model. ValidationMessageFor not working

I'm not getting all my textboxes's validation to work. Only while using "one" at a time. I'm trying to use the same model property for of my variations. Does anyone know a solution to this, or a better way of doing this? @Html.Hidden("AggKPIID",…
0
votes
1 answer

knockout-validation - Custom Template Validation Messages are not changing

I have set up an example in JSFiddle, http://jsfiddle.net/4stu2jg3/63/ In the first textbox if you add a non-numeric number and click the button is will show the required message. I would assume this should be showing the number message since there…
0
votes
1 answer

MVC Foolproof Validation multiple error messages

I am building some custom validations for a ViewModel and have a question in regards to having multiple error messages. I am wanting to create a custom validation on a string attribute. Depending on the values being compared, I wish to output…
0
votes
1 answer

How to show frame if validate message for is valid in Razor?

I am searching for a while solution, but I can not found it. I have this ValidateMessageFor in my Razor, which show error message if it cames to there. Now I have create this css frame for this message and I whant to it be displayed only if there…
DaniKR
  • 2,418
  • 10
  • 39
  • 48
0
votes
1 answer

How can i show a validationMessage (for an input element) programmatically without a Form?

Im not sure if this is possible without using a form. But I would like the browser to render the validation errors. Again, I am doing this programmatically without a form. i.e. No Form tag, and no submitting. Just straight-up scripting. Updated I…
AlvinfromDiaspar
  • 6,611
  • 13
  • 75
  • 140
0
votes
1 answer

ValidationMessage not showing up when using more than one model

I have the form that uses 2 models so I include that this way: @model Equipment.Models.PublicViewModel where PublicViewModel is namespace Equipment.Models { public class PublicViewModel { public Device Devices { get; set; } …
szpic
  • 4,346
  • 15
  • 54
  • 85
1 2
3