• هاست سان
  • با خرید اشتراک ویژه شما میتوانید جدیدترین آپدیت افزونه ها و قالب های زیبا و پرکاربرد زنفورو را دریافت کنید!

    هر ماه یک کد تخفیف 60 درصدی محصولات فروشگاه به کاربران منتخب بخش ویژه اهدا می‌شود

How to cancel a save in _preSave() after validation

وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.

XFFA.IR Bot

پرسنل مدیریت
کاربر ویژه پلاس
کاربر ویژه طلایی
امتیازها 113
راه‌حل‌ها 27
I would like to be able to perform some validation to prevent duplicate entries in _preSave and not save if a duplicate exists. Is there a function I can use to tell the entity to slip this one?

edit: It is worth adding some context. I am saving from an array so I don't want to error out the entire process, but rather just skip the duplicate lines.
 
امضا : XFFA.IR Bot
وضعیت
موضوع بسته شده است و نمی‌توان پاسخ جدیدی فرستاد.

موضوعات مشابه

عقب
بالا