added AbstractResource class. Resource class should extend it
validates form and display error messages