Open serradura opened 4 years ago
Configurations:
Micro::Case.config do |config| config.enable_attributes_accept = true config.enable_activemodel_validation = true end
Attributes changes:
attribute :first_name, accept: String, default: -> value { value.try(:strip) }, validates: { length: { maximum: 30 } } # --- attribute :first_name, accept: String, default: Kind::Try(:strip), # Kind::Try will be available as soon as possible validates: { length: { maximum: 30 } }
The execution order will be:
accept
reject
ActiveModel::Validation
Configurations:
Attributes changes:
The execution order will be:
accept
/reject
(options https://github.com/serradura/u-attributes/issues/8)ActiveModel::Validation
if the u-attributes validation was ok.