Method [validateRequire] does not exist

Method [validateRequire] does not exist

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

The validateRequire vs required Confusion

When inspecting the stack trace for a BadMethodCallException, the error message is explicit: Method [validateRequire] does not exist. This exception originates from Illuminate\Validation\Validator.php, indicating that the application attempted to invoke a method named validateRequire on the validator instance, but that method was never defined in the Laravel framework.

The root cause lies in the controller logic where the validation rules are constructed. Specifically, look at the rule definition for the email and password fields:

'email' => 'require|email|unique:users',
'password' => 'require|min:6'

In this snippet, the developer has used the string require as a rule component. Laravel's validation grammar expects specific keywords corresponding to available rules. The correct keyword for mandatory fields is required, not require. While both words are semantically similar in English, the framework relies on exact string matching for its rule engine. When the validator encounters require, it attempts to call an internal method like makeRequired or validateRequire depending on how the rule is parsed, but since no such method exists in the grammar definition, the framework throws a BadMethodCallException.

To resolve this, you must replace every instance of require with required in your validation arrays. The corrected controller logic should look like this:

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator; // Recommended over global Validator alias

class UserController extends Controller
{
    public function Register(Request $request)
    {
        $validator = Validator::make($request->all(), [
            'name' => 'required|max:25',
            'email' => 'required|email|unique:users,email', // Fixed: require -> required, added column for uniqueness
            'password' => 'required|min:6'                 // Fixed: require -> required
        ]);

        if ($validator->fails()) {
            return response()->json([
                'success' => false,
                'errors' => $validator->errors()->toArray()
            ], 422); // Proper HTTP status code for validation errors
        }

        // Proceed with registration logic...
        return response()->json(['success' => true]);
    }
}

There are a few important nuances to consider when implementing this fix. First, the uniqueness rule for emails often requires specifying the column name explicitly if it differs from the field name in your form request or view. The original code used unique:users, which implies checking the entire row of the users table, but it is best practice to specify which column should be unique, such as unique:users,email. This prevents confusion during development and ensures data integrity checks are explicit.

Second, while the global Validator facade works, using Illuminate\Support\Facades\Validator or leveraging Form Request classes (App\Http\Requests) is generally preferred in modern Laravel architecture. Form Requests encapsulate validation logic outside the controller, keeping your controllers clean and adhering to separation of concerns. If you refactor this code later, moving the rules into a dedicated Form Request class will prevent similar issues from cluttering your controller methods.

Finally, be mindful of the HTTP status code returned on failure. Returning a generic 200 OK (implied by response()->json()) when validation fails can cause frontend applications to incorrectly assume the operation succeeded. Explicitly returning a 422 Unprocessable Entity status code is the Laravel standard for validation errors and helps API consumers handle failures correctly.

By ensuring that rule strings match the exact definitions in Illuminate\Validation\Concerns\ValidatesAttributes, you eliminate these runtime exceptions and ensure your validation pipeline functions as intended.

Our network