add validate script to $.fn