Raesquiv13 / gpos-System

Sistema de punto de venta
1 stars 0 forks source link

Modify API of signup to accept only correct emails. #28

Closed Raesquiv13 closed 4 years ago

Raesquiv13 commented 4 years ago

As the product owner, I want to:

When a new user is going to be created, verify that the email has the correct format: The email must have an @and after the @must have a . for example:

If the email doesn't have the correct format API will respond status : 400 message : Error, formato de correo incorrecto

Raesquiv13 commented 4 years ago

To validate if the email has the correct format, i am going to use a regex. Email regex: /^[-\w.%+]{1,64}@(?:[A-Z0-9-]{1,63}\.){1,125}[A-Z]{2,63}$/i

The regex was found here: https://es.stackoverflow.com/questions/142/validar-un-email-en-javascript-que-acepte-todos-los-caracteres-latinos

Raesquiv13 commented 4 years ago

QA

Test case: Creation https://app.qase.io/project/GPOS

Suite Route: Unit tesing->Service->Users->Validate email format