Move validate func to app. ref #302