diff --git a/README.md b/README.md
index 82d8794a..5f61ef0a 100644
--- a/README.md
+++ b/README.md
@@ -133,7 +133,9 @@ export default class EmeisOptionsService extends Service {
label: "My Input", // this could also be an ember-intl translation key
type: "text",
visible: true,
- readOnly: false
+ readOnly: false,
+ required: false, //marks this field as optional
+ placeholder: "some.translation.key" //ember-intl translation key or plain string
},
{
slug: "test-input-2",
@@ -146,7 +148,8 @@ export default class EmeisOptionsService extends Service {
],
type: "choice",
visible: () => true,
- readOnly: false
+ readOnly: false,
+ required: true, //marks this field as required
}
]
}
@@ -161,6 +164,10 @@ There are special options available for `options`, `type` and `visible` properti
Defines the type of the output component and can either be a _text_ or a _choice_.
+#### **required** - meta field
+
+Marks this field as optional or validates its presence in case it's set to `true`. Custom _choice_ fields may not be validated as required, tho.
+
#### **options** - meta field
In combination with `type:"choice"` the options can be a list of options (`{value, label}`) or a (async) function which resolves to a list of options.
diff --git a/addon/components/edit-form/element.hbs b/addon/components/edit-form/element.hbs
index a2b2f811..593e72da 100644
--- a/addon/components/edit-form/element.hbs
+++ b/addon/components/edit-form/element.hbs
@@ -1,6 +1,9 @@