This is a migrated thread and some comments may be shown as answers.

One validation message for several fields

0 Answers 98 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 09 Aug 2012, 05:31 PM
It looks like my other post didn't save for some reason? Anyway, let me try typing this out again!

So I'm looking for a way to have severa inputs in a form use the same validator message. This is my scenario - I have 8 input fields all requiring 1 - 100 to validate correctly. I find it unnecessary to have 8 validator messages all say the same thing, so I'm looking for a way to have one message on the top of the form that says "must be 1 - 100." However, I can't get this to work without the "data-for" attribute.

I could theoretically "hack" this by creating 8 validator messages, positioning them absolutely, so they would stack, looking like one message. That's a bit "hacky" and I'm hoping to do this the proper way.

Any recommendations would be greatly appreciated. Thanks in advance for your time.

No answers yet. Maybe you can help?

Tags
Validation
Asked by
Jeremy
Top achievements
Rank 1
Share this question
or