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

Comments

@Soonz
Copy link

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

This comment has been minimized.

Copy link
Member

commented Jun 16, 2019

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Member

commented Jun 19, 2019

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.

@weaverryan weaverryan closed this Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.