This project is archived and is in readonly mode.

#415 ✓resolved
Carson Christian

Form.Validator $type => typeOf Conversion Issue

Reported by Carson Christian | October 14th, 2010 @ 04:42 PM | in

It looks like Form.Validator suffers from a find-and-replace induced bug for the switch from $type() to typeOf().

If I understand correctly, the code:

if (typeOf(props.minLength)) return (element.get('value').length >= props.minLength || 0);

Is equivalent to:

if (true) return (element.get('value').length >= props.minLength || 0);

Since typeOf() will always return a string, whereas $type() could return boolean false. There are numerous locations in Form.Validator where this is the case.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket