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

This version
History Node

1.6

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
drf_cpf_cnpj_validator-1.6.tar.gz (2.0 kB) Copy SHA256 hash SHA256 Source None Aug 17, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page