Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def validator(update, context):
- user_pass = context.args[0]
- digit = False
- for i in user_pass:
- if i.isdigit():
- digit = True
- break
- if len(user_pass) >= 8 and digit:
- context.bot.send_message(update.effective_chat.id, 'Ваш пароль безопасен')
- elif len(user_pass) < 8:
- context.bot.send_message(update.effective_chat.id, 'Ваш пароль слишком короткий')
- else:
- context.bot.send_message(update.effective_chat.id, 'В вашем пароле нет цифр')
Advertisement
Add Comment
Please, Sign In to add comment