Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9059215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:55:06+00:00 2026-06-16T14:55:06+00:00

This is probably a simple fix… but I can’t get validation to work. I’ve

  • 0

This is probably a simple fix… but I can’t get validation to work.

I’ve simplified my test back to this…

    $input = array(
       'name' => ''
    );

    $rules = array(
       'name' => 'required|min:3|max:50|alpha'

    );

    $v = Validator::make($input, $rules);

And even though ‘name’ is required and has all the other rules the validator doesn’t contain any errors.

dd($v->errors); // returns NULL

However

dd($v->fails()); // returns bool(true)

Why are there no error messages? When I dump the whole $v object there are no messages to be seen anywhere. Very confused… help appreciated. Thanks.

—- edit

I’ve simplified this even further.
I’ve put this directly in a view to test…

<?php

$input = array(
   'name' => ''
);

$rules = array(
   'name' => 'required'
);

$v = Validator::make($input, $rules);

dd($v);

?>

I still get exactly the same problem?

Here is the $v object

object(Laravel\Validator)#32 (9) {

  ["attributes"]=>
  array(1) {
    ["name"]=>
    string(0) ""
  }
  ["errors"]=>
  NULL
  ["rules":protected]=>
  array(1) {
    ["name"]=>
    array(1) {
      [0]=>
      string(8) "required"
    }
  }
  ["messages":protected]=>
  array(0) {
  }
  ["db":protected]=>
  NULL
  ["bundle":protected]=>
  string(11) "application"
  ["language":protected]=>
  NULL
  ["size_rules":protected]=>
  array(4) {
    [0]=>
    string(4) "size"
    [1]=>
    string(7) "between"
    [2]=>
    string(3) "min"
    [3]=>
    string(3) "max"
  }
  ["numeric_rules":protected]=>
  array(2) {
    [0]=>
    string(7) "numeric"
    [1]=>
    string(7) "integer"
  }
}

Is something in my installation/setup broken?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T14:55:08+00:00Added an answer on June 16, 2026 at 2:55 pm

    You have to test your Validator before there are any errors. Try this:

    if ($v->fails()) {
      dd($v->errors);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm probably missing something really simple but I just can't get this to work!
This is probably something extremely simple but I can't get my head around it
Sorry if this is probably a simple fix but I can't think of one.
This is probably going to be a really simple fix... I just can't figure
This is probably a simple question but I can't seem to figure out how
This is probably pretty simple, but I can't figure out how to do it:
This is probably a very simple fix but I've been unable to find an
This may be a simple fix (well, it probably is) but for some reason
This is my first question here, probably a very simple one but I can't
Probably the fix of this should be something simple, but I just cant find

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.