qor / auth_themes

Auth Themes
MIT License
20 stars 26 forks source link

user can register without providing an email / server side control required #10

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi @raven-chen

Hope you are all well !

For some reason, some people can register on paper2code.com without providing an email address. They fill a username instead.

Please see the screenshot below: Screenshot 2020-09-18 at 09 16 53

Is it possible to control/check the email validity on the server side instead of using an html pattern rule ?

Ps. I am using the auth_themes/clean.

Thanks for your insights and inputs on that.

Cheers, X

raven-chen commented 4 years ago

@x0rzkov Just validate the email presence beforeCreate an user.

ghost commented 4 years ago

@raven-chen thanks as always for your quick replies :-)

Would it trigger an error message on the frontend ?

raven-chen commented 4 years ago

that depends on you. you can control it :trollface:

ghost commented 4 years ago

What do you mean ?

Can't we add this rule here ? https://github.com/qor/auth_themes/blob/master/clean/clean.go#L67