Added custom validation messages and table sorting