class
FormDataExample::OrderFormSchema
- FormDataExample::OrderFormSchema
- Amber::Schema::Definition
- Reference
- Object
Overview
Example 4: Advanced form with conditional fields
Defined in:
amber/schema/examples/form_data_example.crClass Method Summary
-
.conditional_groups
Example 4: Advanced form with conditional fields
-
.content_types
Example 4: Advanced form with conditional fields
-
.failure_type
Example 4: Advanced form with conditional fields
-
.fields
Example 4: Advanced form with conditional fields
-
.required_fields
Example 4: Advanced form with conditional fields
-
.source_blocks
Example 4: Advanced form with conditional fields
-
.success_type
Example 4: Advanced form with conditional fields
-
.validators
Example 4: Advanced form with conditional fields
Instance Method Summary
-
#customer_email : String | Nil
Create getter for the field
-
#customer_name : String | Nil
Store options in field definition Create getter for the field
-
#customer_phone : String | Nil
Create getter for the field
-
#delivery_notes : String | Nil
Create getter for the field
-
#gift_message : String | Nil
Create getter for the field
-
#gift_wrapping : String | Nil
Store options in field definition Create getter for the field
-
#is_gift : Bool | Nil
Store options in field definition Create getter for the field
-
#payment_method : String | Nil
Store options in field definition Create getter for the field
-
#product_name : String | Nil
Store options in field definition Create getter for the field
-
#quantity : Int32 | Nil
Create getter for the field
-
#shipping_city : String | Nil
Create getter for the field
-
#shipping_method : String | Nil
Store options in field definition Create getter for the field
-
#shipping_state : String | Nil
Create getter for the field
-
#shipping_street : String | Nil
Create getter for the field
-
#shipping_zip : String | Nil
Create getter for the field
-
#special_instructions : String | Nil
Create getter for the field
Instance methods inherited from class Amber::Schema::Definition
errors : Array(Amber::Schema::Error)
errors,
parse : LegacyResult
parse,
raw_data : Hash(String, JSON::Any)
raw_data,
to_h : Hash(String, JSON::Any)
to_h,
validate : LegacyResult
validate,
validate_typed : Success(Hash(String, JSON::Any)) | Failure(Hash(String, JSON::Any))
validate_typed
Constructor methods inherited from class Amber::Schema::Definition
new(raw_data : Hash(String, JSON::Any))
new
Class methods inherited from class Amber::Schema::Definition
conditionals : Array(ConditionalGroup)
conditionals,
field_names : Array(String)
field_names,
has_conditionals? : Bool
has_conditionals?,
has_field?(name : String) : Bool
has_field?,
required_field_names : Array(String)
required_field_names,
uses_body_params? : Bool
uses_body_params?,
uses_header_params? : Bool
uses_header_params?,
uses_path_params? : Bool
uses_path_params?,
uses_query_params? : Bool
uses_query_params?
Macros inherited from class Amber::Schema::Definition
content_type(*types)
content_type,
field(name, type, **options)
field,
from_body
from_body,
from_header
from_header,
from_path
from_path,
from_query
from_query,
nested(name, schema_class)
nested,
requires_one_of(*fields)
requires_one_of,
requires_together(*fields)
requires_together,
validate(method_name = nil, &block)
validate,
validates_to(success_type, failure_type = ValidationError)
validates_to,
when_field(field, value)
when_field,
when_present(field)
when_present
Class Method Detail
Instance Method Detail
Store options in field definition Create getter for the field
Store options in field definition Create getter for the field
Store options in field definition Create getter for the field
Store options in field definition Create getter for the field
Store options in field definition Create getter for the field