I am more of a PHP person, not JS - and I think my problem is more a syntax problem ..
I have a small jQuery to \"validate\" and check input value .
It works ok
As to your bonus question, try if (jQuery.inArray(jQuery("input:first").val(), ar) < 0)
if (jQuery.inArray(jQuery("input:first").val(), ar) < 0)