Skip to content

Commit

Permalink
Fix for fully specified class names in PHP 5.3 that are not properly …
Browse files Browse the repository at this point in the history
…translated to name of JS validation function.

Example:
$form->addText('sum', 'Sum')->addRule('\Validators\GeneralValidators::Sum',...);
  • Loading branch information
MartyIX committed Oct 5, 2011
1 parent a59f0a2 commit 5ef52bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client-side/forms/netteForms.js
Expand Up @@ -128,6 +128,7 @@ Nette.validateRule = function(elem, op, arg) {
op = op.substr(1);
}
op = op.replace('::', '_');
op = op.replace('\\', '');
return Nette.validators[op] ? Nette.validators[op](elem, arg, val) : null;
};

Expand Down

0 comments on commit 5ef52bb

Please sign in to comment.