jonathangeiger / kohana-jelly

See the link below for the most up-to-date code
https://github.com/creatoro/jelly
MIT License
146 stars 34 forks source link

[Unstable] Jelly does not work in KO 3.1 #184

Open agentphoenix opened 13 years ago

agentphoenix commented 13 years ago

Kohana has changed the name of the validation class from Validate to Validation. In addition, they've gotten rid of Validate::not_empty method which throws an exception.

agentphoenix commented 13 years ago

I got this working ... I think. These are the changes I made to classes/jelly/core/validator.php:

On line 10, change abstract class Jelly_Core_Validator extends Validate to abstract class Jelly_Core_Validator extends Validation.

On line 224, change if ( ! Validation::not_empty($this[$field])) to if ( ! Validation::rule($this[$field], 'not_empty')).

There may be more. I'll comment on this some more if I find other issues. I haven't looked through the Validation class and compared it to Jelly's validator to see if there are other changes to be made. I'll also make these changes on my fork and issue a pull request.

biakaveron commented 13 years ago

if ( ! Valid::not_empty($this[$field]))

agentphoenix commented 13 years ago

Even better. Thanks!