Hi - this would have to be a filler form to display a dialog box - is that the case here? Or do your users fill out the form in a browser?
If filler, on the field that you are concerned about, add a rule with the condition that the field is less than 0, then display a message - you can enter whatever text you need. No code required.