<div dir="ltr">Hi,<div><br></div><div>the validation should be done not on widget level but on the whole model level. In case of the random generator which is in the VM dialog, it should be validated in the UnitVmModel (the backing model of all the VM-like entities) and inside it in the validate() method. Than this validate() returns true/false if it is valid / invalid. And than the corresponding list model (VmListModel.onSaveVm() for example) calls the validate and only if it passes it should continue to send the data to server.</div><div><br></div><div>Is this not what happens?</div><div><br></div><div>Tomas</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 12, 2017 at 2:38 AM, Tony Wang <span dir="ltr"><<a href="mailto:sline798@gmail.com" target="_blank">sline798@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I find the TextBox Widget of ovirt-engine,such as IntegerEntityModelTextBoxEdito<wbr>r. They are weak in validation. When i input a string or something else can't parse Integer. In view, the widget will make as invalid, but i press the button of "OK", it always can pass. Even, when i edit the entity's attributes, such as Random Generator's Period or Bytes per period of VM, use IntegerEntityModelTextBox* widget, it will save the old data. I can't be sure this is a fault or is normal?</div>
<br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br></blockquote></div><br></div>