← Back
Editing: validators.cpython-311.pyc
� �|�es � �� � d dl mZ d dlmZmZmZmZ d dlmZ d dl m ZmZ G d� de� � Z G d� de� � Ze G d � d � � � � Z G d� de� � Z G d � de� � ZdS )� )�ValidationError)�MaxLengthValidator�MaxValueValidator�MinLengthValidator�MinValueValidator)�deconstructible)�gettext_lazy� ngettext_lazyc �( � e Zd Z eddd� � ZdS )�ArrayMaxLengthValidatorzRList contains %(show_value)d item, it should contain no more than %(limit_value)d.zSList contains %(show_value)d items, it should contain no more than %(limit_value)d.�limit_valueN��__name__� __module__�__qualname__r �message� � �D/usr/lib/python3/dist-packages/django/contrib/postgres/validators.pyr r s( � � � � � ��m�\�]��� �G�G�Gr r c �( � e Zd Z eddd� � ZdS )�ArrayMinLengthValidatorzSList contains %(show_value)d item, it should contain no fewer than %(limit_value)d.zTList contains %(show_value)d items, it should contain no fewer than %(limit_value)d.r Nr r r r r r s( � � � � � ��m�]�^��� �G�G�Gr r c �X � e Zd ZdZ ed� � ed� � d�ZdZd d�Zd� Zd � Z dS )� KeysValidatorz9A validator designed for HStore to require/restrict keys.z Some keys were missing: %(keys)sz)Some unknown keys were provided: %(keys)s)�missing_keys� extra_keysFNc �d � t |� � | _ || _ |�i | j �|�| _ d S d S �N)�set�keys�strict�messages)�selfr r r! s r �__init__zKeysValidator.__init__"