Using Javascript To Validate User Inputs In Python