Hi Newbie 2013 and welcome to InfoPath!
Browser forms don't support popup alerts. So, you have to do it in your form.
So, the submit button is not a good place to put validation since there is no way to alert the user.
Rather, I suggest adding a formatting rule to your Submit button that disables it if the condition which you are validating is not met.
In addition, I would add an optional section to your view near the Submit button that has text in it.
For example, you could simply display: "Invalid input, please check your form fields" but you probably want to be more specific based on your validation criteria.
This section has a formatting rule that hides it if the validation criteria are met (opposite of formatting rule for button).
This way, the user can see that the form is invalid and why when they attempt to submit and you disable submit button anyway, so they don't take the needless action.
Good luck!