Skip to content

Commit

Permalink
Account - 10 chars password minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaGenesin committed Mar 1, 2021
1 parent 997f8d5 commit cbe218a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion components/CreateModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const CreateModal = (isOpen, onOpen, onClose, storeId, productId) => {
const handleSubmit = (event) => {
const newState = stateRef.current;

if (newState.password !== newState.confirmPassword || !isValidEmail(newState.email)) {
if (newState.password !== newState.confirmPassword
|| (newState.password && newState.password.length < 10)
|| !isValidEmail(newState.email)) {
setState({ ...newState, isLoading: false, error: true });
return;
}
Expand Down
8 changes: 4 additions & 4 deletions i18n/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ const i18n = rosetta({
whatsNext: 'What\'s next?',
alertInfo: 'If you want to accept payments, edit or add more listings, please consider creating an account. All you need is your business email and a password. I will never spam you.',
email: 'Your existing Business Email',
password: 'Choose a Password (6 characters minimum)',
password: 'Choose a Password (10 characters minimum)',
confirmPassword: 'Confirm Password',
showPassword: 'Show',
hidePassword: 'Hide',
createAccount: 'Create Account',
error: 'The email may not be valid, the passwords could be too weak or not match.',
error: 'The email may not be valid, the passwords could be too weak (10 characters minimum) or not match.',
copiedToClipboard: 'Copied to your clipboard!',
},
publicProduct: {
Expand Down Expand Up @@ -272,12 +272,12 @@ const i18n = rosetta({
whatsNext: 'Ed ora?',
alertInfo: 'Se vuoi accettare pagamenti, modificare o aggiungere altri prodotti, considera la creazione di un account. Tutto ciò di cui hai bisogno è una email e una password.',
email: 'L\'email di lavoro che già possiedi',
password: 'Scegli una password (minimo 6 caratteri)',
password: 'Scegli una password (minimo 10 caratteri)',
confirmPassword: 'Conferma Password',
showPassword: 'Mostra',
hidePassword: 'Nascondi',
createAccount: 'Crea Account',
error: 'L\'indirizzo email potrebbe non essere valido, le password potrebbero essere troppo deboli o non corrispondono.',
error: 'L\'indirizzo email potrebbe non essere valido, le password potrebbero essere troppo deboli (minimo di 10 caratteri) o non corrispondere.',
copiedToClipboard: 'Copiato nelle note! Incolla dove preferisci e vedi il risultato',
},
publicProduct: {
Expand Down

0 comments on commit cbe218a

Please sign in to comment.