OtsoSilver

Untitled

Jan 30th, 2022
778
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. def validator(update, context):
  2.     user_pass = context.args[0]
  3.     digit = False
  4.     for i in user_pass:
  5.         if i.isdigit():
  6.             digit = True
  7.             break
  8.     if len(user_pass) >= 8 and digit:
  9.         context.bot.send_message(update.effective_chat.id, 'Ваш пароль безопасен')
  10.     elif len(user_pass) < 8:
  11.         context.bot.send_message(update.effective_chat.id, 'Ваш пароль слишком короткий')
  12.     else:
  13.         context.bot.send_message(update.effective_chat.id, 'В вашем пароле нет цифр')
Advertisement
Add Comment
Please, Sign In to add comment