class

Marten::Schema::Field::Array

Inherits Marten::Schema::Field::Base < Marten::Template::Object::Auto < Marten::Template::Object < Marten::Template::CanDefineTemplateAttributes < Reference < Object

Represents an array schema field.

Constructors

new(id : ::String, of_field : Base, required : ::Bool = true)
Source

Instance methods

deserialize(value) : ::Array(Field::Any) | Nil

Deserializes a raw field value to the corresponding field value.

Source
empty_value?(value) : ::Bool

Returns true if the value is considered empty by the field.

Source
get_raw_data(data)

Returns the raw data of the field.

Source
serialize(value) : ::Array(::String) | Nil | ::String

Serializes a field value.

Source
validate(schema, value)

Runs custom validation logic for a specific schema field and schema object.

This method should be overriden for each field implementation that requires custom validation logic.

Source