Skip to main content

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

This version

1.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for drf-cpf-cnpj-validator, version 1.6
Filename, size File type Python version Upload date Hashes
Filename, size drf_cpf_cnpj_validator-1.6.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page