diff --git a/src/validate/html/validateElement.js b/src/validate/html/validateElement.js index beca2086ec..cda56ec730 100644 --- a/src/validate/html/validateElement.js +++ b/src/validate/html/validateElement.js @@ -25,7 +25,7 @@ export default function validateElement ( validator, node ) { } if ( getType( validator, node ) !== 'checkbox' ) { - validator.error( `'checked' binding can only be used with ` ); + validator.error( `'checked' binding can only be used with `, attribute.start ); } } @@ -99,4 +99,4 @@ function getType ( validator, node ) { function list ( items, conjunction = 'or' ) { if ( items.length === 1 ) return items[0]; return `${items.slice( 0, -1 ).join( ', ' )} ${conjunction} ${items[ items.length - 1 ]}`; -} \ No newline at end of file +} diff --git a/test/validator/samples/binding-input-checked/errors.json b/test/validator/samples/binding-input-checked/errors.json new file mode 100644 index 0000000000..05747dc96c --- /dev/null +++ b/test/validator/samples/binding-input-checked/errors.json @@ -0,0 +1,8 @@ +[{ + "message": "'checked' binding can only be used with ", + "loc": { + "line": 1, + "column": 7 + }, + "pos": 7 +}] \ No newline at end of file diff --git a/test/validator/samples/binding-input-checked/input.html b/test/validator/samples/binding-input-checked/input.html new file mode 100644 index 0000000000..9990d3c596 --- /dev/null +++ b/test/validator/samples/binding-input-checked/input.html @@ -0,0 +1 @@ + \ No newline at end of file