Under regulations prescribed by the Secretary of Defense, a commissioned officer on the active-duty list of the Army, Navy, or Air Force who is appointed or designated as a chaplain may, if he fails to maintain the qualifications needed to perform his professional function, be discharged or, if eligible for retirement, may be retired.