| def email(email): | def email(email): | ||||
| # Define a regex pattern for email addresses | # Define a regex pattern for email addresses | ||||
| pattern = r"^[\w\.-]+@([\w-]+\.)+[\w-]{2,4}$" | |||||
| pattern = r"^[\w\.-]+@([\w-]+\.)+[\w-]{2,}$" | |||||
| # Check if the email matches the pattern | # Check if the email matches the pattern | ||||
| if re.match(pattern, email) is not None: | if re.match(pattern, email) is not None: | ||||
| return email | return email |
| import Toast from '../components/base/toast' | import Toast from '../components/base/toast' | ||||
| import { setup } from '@/service/common' | import { setup } from '@/service/common' | ||||
| const validEmailReg = /^[\w\.-]+@([\w-]+\.)+[\w-]{2,4}$/ | |||||
| const validEmailReg = /^[\w\.-]+@([\w-]+\.)+[\w-]{2,}$/ | |||||
| const validPassword = /^(?=.*[a-zA-Z])(?=.*\d).{8,}$/ | const validPassword = /^(?=.*[a-zA-Z])(?=.*\d).{8,}$/ | ||||
| const InstallForm = () => { | const InstallForm = () => { |
| import { login, oauth } from '@/service/common' | import { login, oauth } from '@/service/common' | ||||
| import { apiPrefix } from '@/config' | import { apiPrefix } from '@/config' | ||||
| const validEmailReg = /^[\w\.-]+@([\w-]+\.)+[\w-]{2,4}$/ | |||||
| const validEmailReg = /^[\w\.-]+@([\w-]+\.)+[\w-]{2,}$/ | |||||
| type IState = { | type IState = { | ||||
| formValid: boolean | formValid: boolean |
| export const DEFAULT_VALUE_MAX_LEN = 48 | export const DEFAULT_VALUE_MAX_LEN = 48 | ||||
| export const zhRegex = /^[\u4e00-\u9fa5]$/gm | |||||
| export const emojiRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/gm | |||||
| export const emailRegex = /^[\w\.-]+@([\w-]+\.)+[\w-]{2,4}$/gm | |||||
| export const zhRegex = /^[\u4e00-\u9fa5]$/m | |||||
| export const emojiRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/m | |||||
| export const emailRegex = /^[\w\.-]+@([\w-]+\.)+[\w-]{2,}$/m | |||||
| const MAX_ZN_VAR_NAME_LENGHT = 8 | const MAX_ZN_VAR_NAME_LENGHT = 8 | ||||
| const MAX_EN_VAR_VALUE_LENGHT = 16 | const MAX_EN_VAR_VALUE_LENGHT = 16 | ||||
| export const getMaxVarNameLength = (value: string) => { | export const getMaxVarNameLength = (value: string) => { |