Skip to content

T15567 Form entity not passed with validation #15568

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

Merged
merged 8 commits into from
Aug 12, 2021
Merged

Conversation

stijn1989
Copy link
Contributor

@stijn1989 stijn1989 commented Jul 1, 2021

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Assign the form entity to the entity variable in the isValid method if no entity is provided.

@Jeckerson
Copy link
Member

@stijn1989 Could you write a test case with scenario that you described in a changelog?

@stijn1989
Copy link
Contributor Author

@stijn1989 Could you write a test case with scenario that you described in a changelog?

What do you mean by testcase? A unit test or a real life example? I provided an example in the issue.

@Jeckerson
Copy link
Member

Unit test

@stijn1989
Copy link
Contributor Author

Unit test

Unit test is added to the branch.

@Jeckerson
Copy link
Member

@stijn1989 Your test is failing, could you please check?

@stijn1989
Copy link
Contributor Author

@stijn1989 Your test is failing, could you please check?

Yeah I'm not great in writing tests. I forgot to create a DI container in the test.

stijn1989 and others added 8 commits August 12, 2021 11:05
Pass the form entity to validation if no entity is provided with the isValid method.
Syntax error
create factory default DI
Refs [#atch]
@niden niden merged commit 342403c into phalcon:5.0.x Aug 12, 2021
@niden
Copy link
Member

niden commented Aug 12, 2021

Thank you @stijn1989

@niden niden linked an issue Aug 12, 2021 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

[BUG]: form entity isn't passed to validator
3 participants