Use same JS function to valid 404 search form and main navigation search form