services:
  _defaults:
    public: true

  prestashop.core.constraint_validator.is_url_rewrite_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\IsUrlRewriteValidator'
    arguments:
      - '@prestashop.adapter.legacy.configuration'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.default_language_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\DefaultLanguageValidator'
    arguments:
      - '@=service("prestashop.adapter.legacy.configuration").get("PS_LANG_DEFAULT")'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.customer_name_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\CustomerNameValidator'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.typed_regex_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\TypedRegexValidator'
    arguments:
      - '@prestashop.adapter.legacy.configuration'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.existing_customer_email_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\ExistingCustomerEmailValidator'
    arguments:
      - '@prestashop.adapter.customer.customer_data_source'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.address_zip_code_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\AddressZipCodeValidator'
    arguments:
      - '@translator'
      - '@prestashop.adapter.country.country_zip_code_requirements_provider'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.address_country_dni_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\AddressDniRequiredValidator'
    arguments:
      - '@prestashop.adapter.country.country_required_fields_provider'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.address_country_state_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\AddressStateRequiredValidator'
    arguments:
      - '@prestashop.adapter.country.country_required_fields_provider'
    tags:
      - { name: validator.constraint_validator }

  prestashop.core.constraint_validator.clean_html_validator:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\CleanHtmlValidator'
    arguments:
      - "@=service('prestashop.adapter.legacy.configuration').getBoolean('PS_ALLOW_HTML_IFRAME')"
    tags:
      - { name: validator.constraint_validator }

  prestashop.validator.constraint.unique_state_iso_code:
    class: 'PrestaShop\PrestaShop\Core\ConstraintValidator\UniqueStateIsoCodeValidator'
    tags:
      - { name: validator.constraint_validator }
