Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
1222 มุมมอง

how to cancel that option when one field have 1 information in specific.


for example, if field1 = lalalala, the user cant duplicate the document

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

You can use constraints for this,

_sql_constraints = [
        ('name_uniq', 'UNIQUE (field_name)',  'The name must be unique !')
    ]


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 25
1955
3
ก.ค. 25
3547
1
พ.ค. 25
1668
1
พ.ค. 25
1902
4
พ.ค. 25
3032