changed validate location and made changes for required validation