'validate login
:param field:
:return:'

def validate_login(self, field):

    user = self.get_user()
    if (user is None):
        raise validators.ValidationError('User    does    not    exist.')
    if (user.password != generate_password_hash(self.password.data, user.salt)):
        raise validators.ValidationError('Credentials    incorrect.')
    if ((not user.is_admin) and (not user.is_super_admin)):
        raise validators.ValidationError('Access    Forbidden.    Admin    Rights    Required')
