poll validation and new script file

validation of fields and the script is in new file
todos left