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

Registration form and validation #412

Closed
Soonz opened this issue Jun 2, 2019 · 3 comments
Closed

Registration form and validation #412

Soonz opened this issue Jun 2, 2019 · 3 comments

Comments

@Soonz
Copy link

Soonz commented Jun 2, 2019

When using this command : php bin/console make:registration-form

It should be mentionned ( or done automatically ) that you must set the User "password" variable to "nullable=true" else you face a validation issue like so :

sfsdfsdfsdfsdfsdfsdfsdfsdfsdfsd

@Soonz Soonz changed the title Form registration maker and validation Registration form and validation Jun 2, 2019
@weaverryan
Copy link
Member

this is caused by auto-validation in Symfony 4.3 and the symfony/property-info being installed. I don't like making it nullable=true, as it's really not nullable. I need to check into this a bit more...

@Pierstoval
Copy link

Pierstoval commented Jun 19, 2019

It's a registration form, why would the password have to be null?

I think this is totally legit, especially considering how auto-mapping was made in the first place.

The password could be updated/hashed with an event listener or something, or the use of a DTO could be encouraged in order to avoid such issue.

@weaverryan
Copy link
Member

This should be "fixed" now, in a sense. We've disabled (via the recipe) the auto-mapping feature by default in Symfony 4.3: https://github.com/symfony/recipes/pull/612/files - the auto mapping was causing this problem, and it needs a bit more work so we can work around situations like this.

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

3 participants