Class: AuctionFunCore::Contracts::ApplicationContract Abstract
- Inherits:
-
Dry::Validation::Contract
- Object
- Dry::Validation::Contract
- AuctionFunCore::Contracts::ApplicationContract
- Includes:
- Business::Configuration
- Defined in:
- lib/auction_fun_core/contracts/application_contract.rb
Overview
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.
Direct Known Subclasses
AuctionFunCore::Contracts::AuctionContext::CreateContract, AuctionFunCore::Contracts::AuctionContext::PostAuction::ParticipantContract, AuctionFunCore::Contracts::AuctionContext::PostAuction::WinnerContract, AuctionFunCore::Contracts::AuctionContext::PreAuction::AuctionStartReminderContract, AuctionFunCore::Contracts::AuctionContext::Processor::Finish::ClosedContract, AuctionFunCore::Contracts::AuctionContext::Processor::Finish::PennyContract, AuctionFunCore::Contracts::AuctionContext::Processor::Finish::StandardContract, AuctionFunCore::Contracts::AuctionContext::Processor::PauseContract, AuctionFunCore::Contracts::AuctionContext::Processor::StartContract, AuctionFunCore::Contracts::AuctionContext::Processor::UnpauseContract, BidContext::CreateBidClosedContract, BidContext::CreateBidPennyContract, BidContext::CreateBidStandardContract, StaffContext::AuthenticationContract, StaffContext::RegistrationContract, UserContext::AuthenticationContract, UserContext::EmailConfirmationContract, UserContext::PhoneConfirmationContract, UserContext::RegistrationContract
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