You should write those function in common_functions file which are common to your project.

Suggestion: Don't keep you database/validation function in this file - This will mess with your...