Basic form validation functions implemented