minimo 6 caratteri la registrazione username
Ridurre a 3 gli stati ContribTypes ( aggiornato il regex dell'username in fase di registrazione: caratteri speciali consentiti solo all'interno di una parola
This commit is contained in:
@@ -14,7 +14,11 @@ export class Patterns {
|
|||||||
*
|
*
|
||||||
* public static Password: RegExp = /^((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%!\-]).{6,20})/i
|
* public static Password: RegExp = /^((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%!\-]).{6,20})/i
|
||||||
*
|
*
|
||||||
* 8 to 20 characters string with at least one digit, one upper case letter, one lower case letter and one special symbol
|
|
||||||
|
* 6 to 30 characters string with at least one digit, one upper case letter, one lower case letter and one special symbol
|
||||||
*/
|
*/
|
||||||
|
public static Username = /^[a-zA-Z0-9]+([_@.-]?[a-zA-Z0-9])*$/i
|
||||||
|
|
||||||
|
// * 8 to 20 characters string with at least one digit, one upper case letter, one lower case letter
|
||||||
public static Password = /^((?=.*[A-Z])(?=.*\d)(?!.* ).{8,30})/i
|
public static Password = /^((?=.*[A-Z])(?=.*\d)(?!.* ).{8,30})/i
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -384,7 +384,7 @@
|
|||||||
:useinput="isInModif">
|
:useinput="isInModif">
|
||||||
</CMySelect>
|
</CMySelect>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
<div v-else-if="(col.fieldtype === costanti.FieldType.star5 || col.fieldtype === costanti.FieldType.star3)">
|
||||||
<div v-if="isInModif">
|
<div v-if="isInModif">
|
||||||
<CMySelect
|
<CMySelect
|
||||||
:type_out="col.field_outtype"
|
:type_out="col.field_outtype"
|
||||||
@@ -410,7 +410,7 @@
|
|||||||
:color="tools.getColByLevel(myvalue)"
|
:color="tools.getColByLevel(myvalue)"
|
||||||
icon="star_border"
|
icon="star_border"
|
||||||
icon-selected="star"
|
icon-selected="star"
|
||||||
:max="5"
|
:max="costanti.FieldType.star5 ? 5 : 3"
|
||||||
:readonly="true"
|
:readonly="true"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -701,7 +701,7 @@
|
|||||||
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
:optlab="fieldsTable.getLabelByTable(col.jointable)">
|
||||||
</CMyToggleList>
|
</CMyToggleList>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="col.fieldtype === costanti.FieldType.star5">
|
<div v-else-if="(col.fieldtype === costanti.FieldType.star5 || col.fieldtype === costanti.FieldType.star3)">
|
||||||
<CMySelect
|
<CMySelect
|
||||||
:type_out="col.field_outtype"
|
:type_out="col.field_outtype"
|
||||||
:col="col"
|
:col="col"
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
:label="$t('reg.password')"
|
:label="$t('reg.password')"
|
||||||
:rules="[
|
:rules="[
|
||||||
val => !!val || $t('reg.err.required'),
|
val => !!val || $t('reg.err.required'),
|
||||||
val => val.length > 6 || $t('reg.err.atleast') + ' 6 ' + $t('reg.err.char'),
|
val => val.length > 8 || $t('reg.err.atleast') + ' 8 ' + $t('reg.err.char'),
|
||||||
]">
|
]">
|
||||||
|
|
||||||
<template v-slot:prepend>
|
<template v-slot:prepend>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import useVuelidate from '@vuelidate/core'
|
|||||||
import { minLength, required, sameAs } from '@vuelidate/validators'
|
import { minLength, required, sameAs } from '@vuelidate/validators'
|
||||||
|
|
||||||
// import { ValidationRuleset } from 'vuelidate'
|
// import { ValidationRuleset } from 'vuelidate'
|
||||||
import { complexity, registereduser, aportadorexist } from '../../validation'
|
import { complexity, complexityUser, registereduser, aportadorexist } from '../../validation'
|
||||||
|
|
||||||
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
// import 'vue3-tel-input/dist/vue3-tel-input.css'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
@@ -94,6 +94,7 @@ export default defineComponent({
|
|||||||
username: {
|
username: {
|
||||||
required,
|
required,
|
||||||
minLength: minLength(6),
|
minLength: minLength(6),
|
||||||
|
complexityUser,
|
||||||
registereduser,
|
registereduser,
|
||||||
},
|
},
|
||||||
terms: {
|
terms: {
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ export default defineComponent({
|
|||||||
username: 1,
|
username: 1,
|
||||||
name: 1,
|
name: 1,
|
||||||
surname: 1,
|
surname: 1,
|
||||||
|
mycities: 1,
|
||||||
'profile.img': 1,
|
'profile.img': 1,
|
||||||
'profile.qualifica': 1,
|
'profile.qualifica': 1,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ const msg_de = {
|
|||||||
errore_generico: 'Please review fields again',
|
errore_generico: 'Please review fields again',
|
||||||
atleast: 'must be at least',
|
atleast: 'must be at least',
|
||||||
complexity: 'must contains at least 1 lowercase letter, 1 uppercase letter, 1 digit',
|
complexity: 'must contains at least 1 lowercase letter, 1 uppercase letter, 1 digit',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'must not be more than',
|
notmore: 'must not be more than',
|
||||||
char: 'characters long',
|
char: 'characters long',
|
||||||
terms: 'You need to agree with the terms & conditions.',
|
terms: 'You need to agree with the terms & conditions.',
|
||||||
|
|||||||
@@ -379,6 +379,7 @@ const msg_enUs = {
|
|||||||
errore_generico: 'Please review fields again',
|
errore_generico: 'Please review fields again',
|
||||||
atleast: 'must be at least',
|
atleast: 'must be at least',
|
||||||
complexity: 'must contains at least 1 lowercase letter, 1 uppercase letter, 1 digit',
|
complexity: 'must contains at least 1 lowercase letter, 1 uppercase letter, 1 digit',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'must not be more than',
|
notmore: 'must not be more than',
|
||||||
char: 'characters long',
|
char: 'characters long',
|
||||||
terms: 'You need to agree with the terms & conditions.',
|
terms: 'You need to agree with the terms & conditions.',
|
||||||
|
|||||||
@@ -382,6 +382,7 @@ const msg_es = {
|
|||||||
errore_generico: 'Por favor, rellene los campos correctamente',
|
errore_generico: 'Por favor, rellene los campos correctamente',
|
||||||
atleast: 'debe ser al menos largo',
|
atleast: 'debe ser al menos largo',
|
||||||
complexity: 'debe contener al menos 1 minúscula, 1 mayúscula, 1 dígito',
|
complexity: 'debe contener al menos 1 minúscula, 1 mayúscula, 1 dígito',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'no tiene que ser más largo que',
|
notmore: 'no tiene que ser más largo que',
|
||||||
char: 'caracteres',
|
char: 'caracteres',
|
||||||
terms: 'Debes aceptar las condiciones, para continuar..',
|
terms: 'Debes aceptar las condiciones, para continuar..',
|
||||||
|
|||||||
@@ -380,6 +380,7 @@ const msg_fr = {
|
|||||||
errore_generico: 'S\'il vous plaît remplir les champs correctement',
|
errore_generico: 'S\'il vous plaît remplir les champs correctement',
|
||||||
atleast: 'ça doit être au moins long',
|
atleast: 'ça doit être au moins long',
|
||||||
complexity: 'doit contenir au moins 1 minuscule, 1 majuscule, 1 chiffre',
|
complexity: 'doit contenir au moins 1 minuscule, 1 majuscule, 1 chiffre',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'il ne doit pas être plus long que',
|
notmore: 'il ne doit pas être plus long que',
|
||||||
char: 'caractères',
|
char: 'caractères',
|
||||||
terms: 'Vous devez accepter les conditions, pour continuer..',
|
terms: 'Vous devez accepter les conditions, pour continuer..',
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ const msg_it = {
|
|||||||
sospeso: 'Sospeso',
|
sospeso: 'Sospeso',
|
||||||
username: 'Username',
|
username: 'Username',
|
||||||
username_reg: 'Scegli il tuo Username',
|
username_reg: 'Scegli il tuo Username',
|
||||||
username_hint: 'i caratteri speciali consentiti sono il tratteggio (_) e il meno (-)',
|
username_hint: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
username_pseudonimo: 'Username (Pseudonimo)',
|
username_pseudonimo: 'Username (Pseudonimo)',
|
||||||
username_short: 'Username',
|
username_short: 'Username',
|
||||||
name: 'Nome',
|
name: 'Nome',
|
||||||
@@ -517,6 +517,7 @@ const msg_it = {
|
|||||||
errore_generico: 'Si prega di compilare correttamente i campi',
|
errore_generico: 'Si prega di compilare correttamente i campi',
|
||||||
atleast: 'dev\'essere lungo almeno di',
|
atleast: 'dev\'essere lungo almeno di',
|
||||||
complexity: 'deve contenere almeno 1 minuscola, 1 maiuscola, 1 cifra',
|
complexity: 'deve contenere almeno 1 minuscola, 1 maiuscola, 1 cifra',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'non dev\'essere lungo più di',
|
notmore: 'non dev\'essere lungo più di',
|
||||||
char: 'caratteri',
|
char: 'caratteri',
|
||||||
terms: 'Devi accettare le condizioni, per continuare.',
|
terms: 'Devi accettare le condizioni, per continuare.',
|
||||||
|
|||||||
@@ -392,6 +392,7 @@ const msg_pt = {
|
|||||||
errore_generico: 'Por favor preencha os campos corretamente',
|
errore_generico: 'Por favor preencha os campos corretamente',
|
||||||
atleast: 'deve ser pelo menos',
|
atleast: 'deve ser pelo menos',
|
||||||
complexity: 'deve conter pelo menos 1 letra minúscula, 1 capital, 1 dígito',
|
complexity: 'deve conter pelo menos 1 letra minúscula, 1 capital, 1 dígito',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'não deve ser maior do que',
|
notmore: 'não deve ser maior do que',
|
||||||
char: 'caracteres',
|
char: 'caracteres',
|
||||||
terms: 'Você deve aceitar as condições, para continuar',
|
terms: 'Você deve aceitar as condições, para continuar',
|
||||||
|
|||||||
@@ -393,6 +393,7 @@ const msg_si = {
|
|||||||
errore_generico: 'Prosimo, da pravilno izpolnete vsa polja',
|
errore_generico: 'Prosimo, da pravilno izpolnete vsa polja',
|
||||||
atleast: 'mora biti dolgo vsaj',
|
atleast: 'mora biti dolgo vsaj',
|
||||||
complexity: 'ora vsebobati vsaj 1 malo črko, 1 veliko črko, 1 številko',
|
complexity: 'ora vsebobati vsaj 1 malo črko, 1 veliko črko, 1 številko',
|
||||||
|
complexityUser: 'caratteri consentiti: tratteggio (_), meno (-) e il punto (.)',
|
||||||
notmore: 'ne sme biti dolgo več kot',
|
notmore: 'ne sme biti dolgo več kot',
|
||||||
char: 'karakterji',
|
char: 'karakterji',
|
||||||
terms: 'Za nadaljevanje, moraš sprejeti pogoje poslovanja.',
|
terms: 'Za nadaljevanje, moraš sprejeti pogoje poslovanja.',
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export const costanti = {
|
|||||||
binary: 8,
|
binary: 8,
|
||||||
html: 16,
|
html: 16,
|
||||||
select: 32,
|
select: 32,
|
||||||
|
star3: 35,
|
||||||
star5: 40,
|
star5: 40,
|
||||||
number: 64,
|
number: 64,
|
||||||
typeinrec: 128,
|
typeinrec: 128,
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ export const colmySkills = [
|
|||||||
AddCol({
|
AddCol({
|
||||||
name: 'numLevel',
|
name: 'numLevel',
|
||||||
label_trans: 'level.name',
|
label_trans: 'level.name',
|
||||||
fieldtype: costanti.FieldType.star5,
|
fieldtype: costanti.FieldType.star3,
|
||||||
required: false,
|
required: false,
|
||||||
jointable: 'levels',
|
jointable: 'levels',
|
||||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||||
@@ -604,7 +604,7 @@ export const colmySkills = [
|
|||||||
fieldtype: costanti.FieldType.multiselect,
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
jointable: 'statusSkills',
|
jointable: 'statusSkills',
|
||||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||||
noshowlabel: false,
|
noshowlabel: true,
|
||||||
icon: 'mood',
|
icon: 'mood',
|
||||||
}),
|
}),
|
||||||
AddCol({
|
AddCol({
|
||||||
@@ -613,7 +613,7 @@ export const colmySkills = [
|
|||||||
fieldtype: costanti.FieldType.multiselect,
|
fieldtype: costanti.FieldType.multiselect,
|
||||||
jointable: 'contribtypes',
|
jointable: 'contribtypes',
|
||||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||||
noshowlabel: false,
|
noshowlabel: true,
|
||||||
icon: 'currency_exchange',
|
icon: 'currency_exchange',
|
||||||
//icon: 'fas fa-hands-helping',
|
//icon: 'fas fa-hands-helping',
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -4315,6 +4315,11 @@ export const tools = {
|
|||||||
return t('reg.err.complexity')
|
return t('reg.err.complexity')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (item.complexityUser !== undefined) {
|
||||||
|
if (item.complexityUser.$invalid) {
|
||||||
|
return t('reg.err.complexityUser')
|
||||||
|
}
|
||||||
|
}
|
||||||
// if (!item.maxLength) { return t('reg.err.notmore') + ` ${item.$params.maxLength.max} ` + t('reg.err.char') }
|
// if (!item.maxLength) { return t('reg.err.notmore') + ` ${item.$params.maxLength.max} ` + t('reg.err.char') }
|
||||||
|
|
||||||
if (item.required !== undefined) {
|
if (item.required !== undefined) {
|
||||||
|
|||||||
@@ -3,3 +3,7 @@ import { Patterns } from '@/common'
|
|||||||
export function complexity(password: string) {
|
export function complexity(password: string) {
|
||||||
return Patterns.Password.test(password)
|
return Patterns.Password.test(password)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function complexityUser(username: string) {
|
||||||
|
return Patterns.Username.test(username)
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ export { duplicate } from './duplicate'
|
|||||||
export { registereduser } from './registereduser'
|
export { registereduser } from './registereduser'
|
||||||
export { aportadorexist } from './aportadorexist'
|
export { aportadorexist } from './aportadorexist'
|
||||||
export { registeredemail } from './registeredemail'
|
export { registeredemail } from './registeredemail'
|
||||||
export { complexity } from './complexity'
|
export { complexity, complexityUser } from './complexity'
|
||||||
export { alfanum } from './alfanum'
|
export { alfanum } from './alfanum'
|
||||||
export { email } from './email'
|
export { email } from './email'
|
||||||
|
|||||||
@@ -215,21 +215,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-btn
|
<q-btn
|
||||||
label="emptyDbSkill" color="negative"
|
label="1. Cancella e Ricrea tutte le Tabelle (Sector, Skill, SubSkill, City, Province, Contribtype, AdType)" color="negative"
|
||||||
@click="EseguiFunz('emptyDbSkill')"></q-btn>
|
@click="EseguiFunz('emptyDbSkill')"></q-btn>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-btn
|
<q-btn
|
||||||
label="copyFrom1To13" color="negative"
|
label="2. Popola Tutte le Tabelle vuote (o incomplete)" color="negative"
|
||||||
@click="EseguiFunz('copyFrom1To13')"></q-btn>
|
@click="EseguiFunz('PopulateTables')"></q-btn>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<q-btn
|
<q-btn
|
||||||
label="Populate Tables" color="negative"
|
label="copyFrom1To13" color="negative"
|
||||||
@click="EseguiFunz('PopulateTables')"></q-btn>
|
@click="EseguiFunz('copyFrom1To13')"></q-btn>
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user