function church_validate($data) { $church = new Church(); if (strpos($data['fn'], "edit")) { $type = "edit"; } if (strpos($data['fn'], "delete")) { $type = "delete"; } if (strpos($data['fn'], "create")) { $type = "create"; } return $church->_validate($data, $type, false); }