const { customElement } = Polymer . decorators ; @ customElement ( 'time-validator' ) export default class TimeValidatorElement extends Polymer . mixinBehaviors ( [ Polymer . IronValidatorBehavior ] , Polymer . Element ) { validate ( value ) { return ! value || value . match ( /^[0-9]{0,2}:[0-9]{0,2}$/ ) ; } }