Release 2.4
The following changes have been prepared and implemented.
Attributes
Options
Dynamic Options
Dynamic options have been implemented.
ruby
input :email,
type: String,
format: :email
input :password,
type: String,
format: :passwordruby
input :page_number,
type: Integer,
min: 1ruby
input :page_size,
type: Integer,
min: 1,
max: 20ruby
input :token,
type: String,
token: {
is: :jwt,
message: "Invalid token"
} Option consists_of
Added the ability to disable the consists_of option using the false value.
ruby
input :ids,
type: Array,
consists_of: falseMethods
Method fail_input!
Added support for the meta attribute
ruby
fail_input!(
:invoice_number,
message: "Invalid invoice number",
meta: {
received_invoice_number: inputs.invoice_number
}
)Method fail_internal!
Added support for the meta attribute
ruby
fail_internal!(
:invoice_number,
message: "Invalid invoice number",
meta: {
received_invoice_number: internals.invoice_number
}
)Method fail_output!
Added support for the meta attribute
ruby
fail_output!(
:invoice_number,
message: "Invalid invoice number",
meta: {
received_invoice_number: outputs.invoice_number
}
)