Added optional validation handling on elements.