Skip to main content

Bug Tracker

Side navigation

#5415 closed feature (fixed)

Opened October 28, 2009 02:11PM UTC

Closed February 05, 2010 08:33PM UTC

validate - getting error messages

Reported by: ThomasBauer Owned by:
Priority: major Milestone: 1.4
Component: plugin Version: 1.3.2
Keywords: validate Cc:
Blocked by: Blocking:

It would be helpfull to egt by the attributes put in HTML (for example: validate="required: true, minlength:50") the responding message. Whith this you can add a help into your dise and user must not wait to get an error to know how to fill the form.

Attachments (0)
Change History (2)

Changed October 28, 2009 02:55PM UTC by ThomasBauer comment:1

I have now found a solution. I have extended the prototype definitons with the following code:

getMessage: function(element) {

element = this.clean( element );

// if radio/checkbox, validate first element in group instead

if (this.checkable(element)) {

element = this.findByName( )[0];


var rules = $(element).rules();

var dependencyMismatch = false;

var listMessages = new Array();

for( method in rules ) {

var rule = { method: method, parameters: rules[method] };

var message = this.defaultMessage( element, rule.method );

if ( typeof message == "function" )

message =, rule.parameters, element);



return listMessages;


Changed February 05, 2010 08:33PM UTC by john comment:2

resolution: → fixed
status: newclosed

Please file plugin bugs with the appropriate author on their bug tracker.