Adds basic validation functionality.