(1) A person who wishes to enter or remain in a prison as a visitor must, if asked, submit to a formal search.
(2) In this section "formal search" means a search to detect the presence of drugs weapons or metal articles carried out by an electronic or mechanical device.
(3) If, when asked, a person does not submit to a formal search, a prison officer may prohibit the person from entering the prison or if the person is in the prison order the person to leave the prison immediately.