FOSUserBundle icon indicating copy to clipboard operation
FOSUserBundle copied to clipboard

Lack of email validation in console

Open mrok opened this issue 13 years ago • 2 comments

Hi

I have tried to add new user like that:

Symfony > fos:user:create Please choose a username:XXX Please choose an email:NOT_EMAIL Please choose a password:XXX Created user xstream

I think I should rather got info that it is not a valid email address.

mrok avatar Nov 20 '11 22:11 mrok

I suppose you could open a PR fixing this as it eould be quite easy, but IMO the command should only be used in development by a developer and not the an end user. The developer should know what he is doing when running the command.

dustin10 avatar Dec 04 '11 01:12 dustin10

the commands are indeed meant for developers as a way to create quickly a user. They don't check if the username or the email are available either for instance.

We could eventually validate the object before persisting it but validating things during the interaction will be hard IMO as we don't have the user yet to use the Validator component

stof avatar Dec 04 '11 01:12 stof