A small and quick validation plugin for CPF or CNPJ in django rest framework!
Project description
Examples:
from rest_framework import serializers
from drf_cpf_cnpj_validator.validadors import cpf_validator, cnpj_validator
class PersonSerializer(serializers.ModelSerializer):
cpf = serializers.Charfield(validators=[cpf_validator])
class CompanySerializer(serializers.ModelSerializer):
cnpj = serializers.Charfield(validators=[cnpj_validator])
Translations:
This plugin translate the messages from your LANGUAGE_CODE , located in settings.py.
Enabled translations:
en-US
pt-BR
es-ES
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for drf_cpf_cnpj_validator-1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eeee06f859787d109036ced24f16ba8cf2dd7c7dad73935c2f8cce251296493 |
|
MD5 | e42dd24990c70675374b112929923dac |
|
BLAKE2b-256 | a4bc6677321116c62c593be37b2c7892b953e4c96e444c3944429bfbb26298c1 |