Validates a component. Sets is-invalid
when invoked, is-interacted
on blur and an error message.
validation = { pattern, message }
pattern
is either a regex or function that will be invoked on the value of the component.message
is the error messge that will be displayed if the element is invalid, interacted and focused.