Open goksubilge opened 3 weeks ago
[ ] A form should be created to sign up a new user
[ ] Page URL should be /signup
/signup
[ ] First you need to create and Axios instance with baseURL: https://workintech-fe-ecommerce.onrender.com
Axios instance
[ ] You need to use react-hook-form library
react-hook-form
[ ] Name: name field is required with min 3 char validation
name
[ ] Email: email needs to be validated
email
[ ] Password: password needs to be min 8 character including numbers, lower case, upper case and special chars
password
[ ] Password Validation: password needs to be matched to second pass input field
Role: role_id field should be listed in selection box and data needs to be fetched by GET request to endpoint: /roles
role_id
/roles
If store option is selected as a role,
store
phone
tax_no
bank_account
[ ] on Submit it should create a POST request to endpoint /signup with form data
[ ] Data Format
{ name, email, password, role_id }
{ name, email, password, role_id, store: { name, phone, tax_no, bank_account } }
ERROR!
[ ] A form should be created to sign up a new user
[ ] Page URL should be
/signup
[ ] First you need to create and
Axios instance
with baseURL: https://workintech-fe-ecommerce.onrender.com[ ] You need to use
react-hook-form
library[ ] Name:
name
field is required with min 3 char validation[ ] Email:
email
needs to be validated[ ] Password:
password
needs to be min 8 character including numbers, lower case, upper case and special chars[ ] Password Validation:
password
needs to be matched to second pass input fieldRole:
role_id
field should be listed in selection box and data needs to be fetched by GET request to endpoint:/roles
role_id
key in form dataIf
store
option is selected as a role,name
field should be appear at least 3 charphone
field should be valid Türkiye phone numbertax_no
field should be appear and it should match the pattern “TXXXXVXXXXXX” ⇒ X can be any numberbank_account
field should be valid IBAN address[ ] on Submit it should create a POST request to endpoint
/signup
with form data[ ] Data Format
{ name, email, password, role_id }
{ name, email, password, role_id, store: { name, phone, tax_no, bank_account } }
ERROR!