|
|
@ -25,7 +25,7 @@ export default function validateElement ( validator, node ) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ( getType( validator, node ) !== 'checkbox' ) {
|
|
|
|
if ( getType( validator, node ) !== 'checkbox' ) {
|
|
|
|
validator.error( `'checked' binding can only be used with <input type="checkbox">` );
|
|
|
|
validator.error( `'checked' binding can only be used with <input type="checkbox">`, attribute.start );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -99,4 +99,4 @@ function getType ( validator, node ) {
|
|
|
|
function list ( items, conjunction = 'or' ) {
|
|
|
|
function list ( items, conjunction = 'or' ) {
|
|
|
|
if ( items.length === 1 ) return items[0];
|
|
|
|
if ( items.length === 1 ) return items[0];
|
|
|
|
return `${items.slice( 0, -1 ).join( ', ' )} ${conjunction} ${items[ items.length - 1 ]}`;
|
|
|
|
return `${items.slice( 0, -1 ).join( ', ' )} ${conjunction} ${items[ items.length - 1 ]}`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|