validation for weight input