I have a content type with a Float field. When my users accidentally enter (or copy/paste) a value with trailing whitespace (e.g. "11 "), drupal gives them the ugly error message:
Only numbers and the decimal separator (.) allowed in Weight.
But this should be a very easy thing to solve and is not something to bother the user with. However, I can't seem to figure out how to interject code from my module at the right place in order to trim()
the value before drupal does its field validation.
Help?