How to set float value to more then zero or non-zero

how can i set a float value to be non-zero

add a script

frappe.ui.form.on(‘Item’, {
validate: function(frm) {
if (frm.doc.weight_per_unit === 0) {
frappe.msgprint(__(‘Quantity Must be Grester Then Zero.’));
frappe.validated = false; // Prevent the form from being saved
}

},

});