validate indeterminate binding

pull/922/head
Rich Harris 8 years ago
parent 38ad29ec00
commit 13d2b67d83

@ -83,17 +83,17 @@ export default function validateElement(
} }
checkTypeAttribute(validator, node); checkTypeAttribute(validator, node);
} else if (name === 'checked') { } else if (name === 'checked' || name === 'indeterminate') {
if (node.name !== 'input') { if (node.name !== 'input') {
validator.error( validator.error(
`'checked' is not a valid binding on <${node.name}> elements`, `'${name}' is not a valid binding on <${node.name}> elements`,
attribute.start attribute.start
); );
} }
if (checkTypeAttribute(validator, node) !== 'checkbox') { if (checkTypeAttribute(validator, node) !== 'checkbox') {
validator.error( validator.error(
`'checked' binding can only be used with <input type="checkbox">`, `'${name}' binding can only be used with <input type="checkbox">`,
attribute.start attribute.start
); );
} }

Loading…
Cancel
Save