class

AzuCLI::Generate::Validator

Inherits Teeplate::FileTree < Reference < Object

Validator generator that creates Azu::Validator classes

Constants

OUTPUT_DIR = "./src/validators"

Constructors

new(name : String, record_type : String = "User", validation_rules : Array(String) = [] of String)
Source

Instance methods

____collect_files(____files)

:nodoc:

Source
__ecr0(____io)
Source
class_name

Convert name to validator class name

Source
common_validations

Get common validation patterns

Source
has_validation_rules?

Check if validator has validation rules

Source
name
Source
name=(name : String)
Source
record_type
Source
record_type=(record_type : String)
Source
snake_case_name
Source
snake_case_name=(snake_case_name : String)
Source
validation_logic

Get validation logic based on rules

Source
validation_rules
Source
validation_rules=(validation_rules : Array(String))
Source
validation_rules_comments

Get validation rules as comments

Source