Well, here is the question.
ds.xml
When I add a new record, it works well.
But when I update a record, it also show the error icon.
There goes the problem, When update a record, it shouldn't show a error, because the modelName exists is itself's name.
How should I do to solve the problem without DMI logic?
ds.xml
Code:
<field name="modelName" title="型号名称" width="10%" type="text" required="true">
<validators>
<validator type="lengthRange" min="1" max="30" errorMessage="请检查是否超过长度限制!"/>
<validator type="isUnique" errorMessage="型号名称已存在!"/>
</validators>
</field>But when I update a record, it also show the error icon.
There goes the problem, When update a record, it shouldn't show a error, because the modelName exists is itself's name.
How should I do to solve the problem without DMI logic?