Can you update this to Laravel 4?
This awesome package was obviously prepared for Laravel 3, is there any hope someone could prepare a Laravel 4 version of this?
Yes. That would be great to make it compatible with Laravel4. Even I am waiting for @joecwallace to make the required changes.
Thanks.
OK. I'll try to look at this soon. I'll update to L4 and L5 - hopefully around the time L5 releases.
If anybody wants to get a head start and submit a PR, I would appreciate it.
I got started on this. I still need to update the documentation, test some more, and submit the package on Packagist, but you should be able to use it with something like this in composer.json:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/joecwallace/jquery-validator"
}
],
"require": {
...
"joecwallace/jquery-validator": "dev-master"
}
...
}
Add JqueryValidator\HtmlServiceProvider to the providers array in app/config/app.php.
Publish the JS with php artisan asset:publish joecwallace/jquery-validator.
The API changed, and should be used like this:
{{ Form::validate('username' => 'required|email', 'password' => 'required')->open() }}
{{ Form::text('username') }}
{{ Form::password('password') }}
{{ Form::close() }}
That should be it. Let me know if you have any trouble.