regNameSurnameMandatory

askUSernameTelegramToTheReg
@ davanti all'username
This commit is contained in:
Surya Paolo
2024-01-19 23:38:15 +01:00
parent 1ea2ef1ea3
commit fbebd925b1
8 changed files with 53 additions and 16 deletions

View File

@@ -1,9 +1,10 @@
import { Patterns } from '@/common'
import { tools } from '../store/Modules/tools'
export function complexity(password: string) {
return Patterns.Password.test(password)
}
export function complexityUser(username: string) {
return Patterns.Username.test(username)
return Patterns.Username.test(tools.rimuoviAtInizio(username))
}

View File

@@ -2,6 +2,8 @@ import { default as Axios, AxiosResponse } from 'axios'
// import { IPayload } from 'model'
import { GlobalConfig, PayloadMessageTypes } from '../common'
import { tools } from '@store/Modules/tools'
import { helpers } from '@vuelidate/validators'
const { withAsync } = helpers
@@ -16,7 +18,7 @@ export function _registereduser (userName: string) {
return res.status !== PayloadMessageTypes.statusfound
}
return Axios.get(VALIDATE_USER_URL + process.env.APP_ID + '/' + userName)
return Axios.get(VALIDATE_USER_URL + process.env.APP_ID + '/' + tools.rimuoviAtInizio(userName))
.then(onSuccess)
.catch((err) => {
return true