Improves error detection and display in search form