Skip to content

Commit

Permalink
Assert bairro até 30 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
brunovcosta committed Nov 25, 2024
1 parent e0c08e9 commit b0ce50d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions abstra_notas/nfse/sp/sao_paulo/envio_rps.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ def __post_init__(self):
if self.endereco_cep is not None:
self.endereco_cep = normalizar_cep(self.endereco_cep)

assert self.endereco_bairro is None or len(
self.endereco_bairro
) <= 30, "O bairro deve ter no máximo 30 caracteres"

if self.endereco_uf is not None:
if isinstance(self.endereco_uf, str):
uf_str = self.endereco_uf
Expand Down

0 comments on commit b0ce50d

Please sign in to comment.