Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation Required Rule Only Accepts Arrays or Strings #423

Closed
SmolSoftBoi opened this issue Mar 2, 2017 · 5 comments
Closed

Validation Required Rule Only Accepts Arrays or Strings #423

SmolSoftBoi opened this issue Mar 2, 2017 · 5 comments

Comments

@SmolSoftBoi
Copy link
Contributor

SmolSoftBoi commented Mar 2, 2017

#The validation required rule currently only accepts arrays or strings, I am trying to pass it a DateTime object and it errors out, should the required rule be made to allow other types?

@SmolSoftBoi SmolSoftBoi changed the title Validation Required Rule Only Accepts Booleans or Strings Validation Required Rule Only Accepts Arrays or Strings Mar 2, 2017
@lonnieezell
Copy link
Member

yes it should be allowed to accept anything.

@SmolSoftBoi
Copy link
Contributor Author

SmolSoftBoi commented Mar 3, 2017

@lonnieezell In what instant should an object be considered to pass the required rule? Currently, I'm just passing the rule for any object.

On a side note, I've also created my own rule set for PHP types, what're your thoughts on this?

@vahidvdn
Copy link

@EpicKris Why not use use anonymous function as a rule?

@codeliter
Copy link

@vahidvdn I think that would be a better approach

@lonnieezell
Copy link
Member

Fixed in e3f42e9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants