[minor] Allow hidden + mandatory if default is set webnotes/erpnext#870
This commit is contained in:
parent
1281d2ca6d
commit
c6831eb747
1 changed files with 2 additions and 2 deletions
|
|
@ -188,8 +188,8 @@ def validate_fields(fields):
|
|||
raise_exception=1)
|
||||
|
||||
def check_hidden_and_mandatory(d):
|
||||
if d.hidden and d.reqd:
|
||||
webnotes.msgprint("""#%(idx)s %(label)s: Cannot be hidden and mandatory (reqd)""" % d.fields,
|
||||
if d.hidden and d.reqd and not d.default:
|
||||
webnotes.msgprint("""#%(idx)s %(label)s: Cannot be hidden and mandatory (reqd) without default""" % d.fields,
|
||||
raise_exception=True)
|
||||
|
||||
def check_max_items_in_list(fields):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue