Open ilsusunal opened 4 months ago
[x] A form should be created to sign up a new user
[x] Page URL should be /signup
/signup
[x] First you need to create and Axios instance with baseURL: https://workintech-fe-ecommerce.onrender.com
Axios instance
[x] You need to use react-hook-form library
react-hook-form
[x] Name: name field is required with min 3 char validation
name
[x] Email: email needs to be validated
email
[x] Password: password needs to be min 8 character including numbers, lower case, upper case and special chars
password
[x] 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
[x] on Submit it should create a POST request to endpoint /signup with form data
[x] Data Format
{ name, email, password, role_id }
{ name, email, password, role_id, store: { name, phone, tax_no, bank_account } }
ERROR!
[x] A form should be created to sign up a new user
[x] Page URL should be
/signup
[x] First you need to create and
Axios instance
with baseURL: https://workintech-fe-ecommerce.onrender.com[x] You need to use
react-hook-form
library[x] Name:
name
field is required with min 3 char validation[x] Email:
email
needs to be validated[x] Password:
password
needs to be min 8 character including numbers, lower case, upper case and special chars[x] 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[x] on Submit it should create a POST request to endpoint
/signup
with form data[x] Data Format
{ name, email, password, role_id }
{ name, email, password, role_id, store: { name, phone, tax_no, bank_account } }
ERROR!