PHP (Zend Framework 1) into JS form validator