Improved validation and visual feedback

The weight textbox shakes if an invalid value is entered.
This way the user will be informed of the situation visually.