Dexagogo Really Easy Field Validation

Hi guys,

I’m trying to use Dexagogo’s Really Easy Field validation for my project http://tetlaw.id.au/view/javascript/really-easy-field-validation and I’m having trouble getting it to work on two seperate forms.

I have two forms in my application with the id, ‘new_event’ and ‘new_claim’.

in my application.js (which is included), I have the following code:

document.observe(“dom:loaded”, function(){

var valid1 = new Validation(‘new_event’, {immediate : true});
var valid2 = new Validation(‘new_claim’, {immediate: true});
});

My text fields that require validation all has the class=“required” on both forms.

Problem now, is that only the new_event form, works as it should be, upon leaving the text_field, it gets validated immediately via ajax.

new_claim on the other hand doesn’t work.

I’m pretty new to prototype and javascript so please bear with my ignorance if I’ve missed out something really basic.

Thanks again.

Warmest regards,
David Chua