views:

20

answers:

1

I'd really use your help!

Js is not really my thing.. I'm making validation form script in my page and browsing through examples scripts iI run into this:

['required', 'This is a required field.', function(v) { return !Validation.get('IsEmpty').test(v); }],

I need to put image instead of 'This is a required field.' Is it the right place? And if.. how should I do it?;(

Thx in advance for any suggestions!:)

A: 

I don't know exactly what are you using, but try this:

['required', '<img alt="This is a required field." src="path/to/required.png" />', function(v) { return !Validation.get('IsEmpty').test(v); }],

since it's filling the text, it should put the html markup in instead of it, unless it's escaping html.

aularon
unfortunately this code doesn't work;(