Skip to content

Commit

Permalink
BUGFIX wrap parsley.extend.js in closure, fixes #33, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sheadawson committed Mar 13, 2015
1 parent 8628217 commit 4063df2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ To use ZenValidator in the CMS, simply implement a getCMSValidator() method on y
public function getCMSValidator(){
return ZenValidator::create()->setConstraint('Content', Constraint_required::create()
->setMessage('Please enter some content'));

// currently parsley validation doesn't work so well in the cms, so disable.
$validator->disableParsley();
}
```

Expand Down
2 changes: 2 additions & 0 deletions javascript/parsley/parsley.remote.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(function($)){
// `window.ParsleyExtend`, like `ParsleyAbstract`, is inherited by `ParsleyField` and `ParsleyForm`
// That way, we could add new methods or redefine some for these both classes. In particular case
// We are adding async validation methods that returns promises, bind them properly to triggered
Expand Down Expand Up @@ -2345,3 +2346,4 @@ if ('undefined' !== typeof window.ParsleyValidator)
$('[data-parsley-validate]').parsley();
});
}));
})(jQuery);
Loading

0 comments on commit 4063df2

Please sign in to comment.