export const WORKER_PASSWORD_MIN_LENGTH = 8

export const WORKER_PASSWORD_RULE_MESSAGE = '密码至少 8 位，且必须包含英文字母和数字'

export function isWorkerPasswordStrong(value: unknown): boolean {
  const password = String(value || '')
  return (
    password.length >= WORKER_PASSWORD_MIN_LENGTH &&
    /[a-zA-Z]/.test(password) &&
    /\d/.test(password)
  )
}
