Validations in python