Class: AuctionFunCore::Contracts::ApplicationContract Abstract

Inherits:
Dry::Validation::Contract
  • Object
show all
Includes:
Business::Configuration
Defined in:
lib/auction_fun_core/contracts/application_contract.rb

Overview

This class is abstract.

The class includes several macros for common validation tasks, such as validating email format, login format, name format, phone number format, and password format. These macros utilize regular expressions and predefined length ranges to ensure the input data meets specific criteria.

Constant Summary collapse

I18N_MACRO_SCOPE =
"contracts.errors.custom.macro"
EMAIL_REGEX =
/\A[\w+\-.]+@[a-z\d-]+(\.[a-z\d-]+)*\.[a-z]+\z/i

Constants included from Business::Configuration

Business::Configuration::AUCTION_KINDS, Business::Configuration::AUCTION_MAX_TITLE_LENGTH, Business::Configuration::AUCTION_MIN_TITLE_LENGTH, Business::Configuration::AUCTION_STATUSES, Business::Configuration::AUCTION_STOPWATCH_MAX_VALUE, Business::Configuration::AUCTION_STOPWATCH_MIN_VALUE, Business::Configuration::MAX_NAME_LENGTH, Business::Configuration::MAX_PASSWORD_LENGTH, Business::Configuration::MIN_NAME_LENGTH, Business::Configuration::MIN_PASSWORD_LENGTH