Support the ongoing development of Laravel.io →
posted 11 years ago
Validation

From php artisan tinker I called $val->passes() and get the following error

[3] > $val = $player->getValidator($aPlayer);
// object(Illuminate\Validation\Validator)(
//   'container' => object(Illuminate\Foundation\Application)(
//
//   )
// )
[4] > $val->passes();
PHP Fatal error:  Uncaught exception 'BadMethodCallException' with message 'Method [validateBoolean] does not exist.' in /vagrant/laravel/vendor/laravel/framework/src/Illuminate/Validation/Validator.php:2225

When I remove the boolean validation rule...

[3] > $val = $player->getValidator($aPlayer);
// object(Illuminate\Validation\Validator)(
//   'container' => object(Illuminate\Foundation\Application)(
//
//   )
// )
[4] > $val->passes();
// true
[5] > exit();
Last updated 3 years ago.
0

This was an issue with earlier versions of Laravel, so you might want to update the framework. See https://github.com/laravel/framework/commit/95aaa4de97bdddd4156b06afdad0a66196086565

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

cmpdev cmpdev Joined 20 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.