Skip to content

Commit

Permalink
Merge pull request #16 from PolymerElements/required
Browse files Browse the repository at this point in the history
form elements can have the required attribute
  • Loading branch information
notwaldorf committed Aug 6, 2015
2 parents b233913 + a63fbf0 commit f7614d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions iron-form-element-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@
type: String
},

/**
* Set to true to mark the input as required. If used in a form, a
* custom element that uses this behavior should also use
* Polymer.IronValidatableBehavior and define a custom validation method.
* Otherwise, a `required` element will always be considered valid.
* It's also strongly recomended to provide a visual style for the element
* when it's value is invalid.
*/
required: {
type: Boolean,
value: false
},

/**
* The form that the element is registered to.
*/
Expand Down

0 comments on commit f7614d5

Please sign in to comment.