1. have you checked what's the value of 'total' when validation is evaluated?
2. is 'total' list item property or named control?
what is its datatype?
3. have you checked there are no errors reported on developer console?
Could you provide a screenshot of the total control's settings? You should set it to a number data type like decimal or integer to tell forms not to do a string validation but a numeric validation.
Both of your validation attempts should work then.