Execute function when fill field

I need execute some function in JS when fill taxes_and_charges field on purchase invoice doctype.

@Leonardo_Augusto,

on taxes_and_charges use the frappe.call method and call your function

frappe.ui.form.on("Purchase invoice", "taxes_and_charges", function(frm) {
	return frappe.call({
		method: "path.to.your.function",
		args: {
			key: value
		},
		callback: function(r) {
			// callback method
		}
	});
});

Nice!!!
Has some function before validate? like before_save

@Leonardo_Augusto,

No, validate is the first trigger on Save, Submit button click

Ok then, thank’s for reply.