Improved url regex and check for no input on submit