Prevent form submit if the record has changed while the form was open

Prevent form submit if the record has changed while the form was open

We have a common situation that causes unexpected behaviors in our creator apps.  Does Zoho have a fix for this, since it must be common for lots of folks?

1. User A edits a record which opens the record to a form
2. The record is changed elsewhere (e.g. by User B editing the same record and submitting changes, or by a deluge task being run from another part of the app updating the record)
3. Then User A submits the form, and all data changes from step 2 are lost

I can write a validation workflow to fix this(see below), but then I would have to add this snippet of code to the On Validate workflow of every single form on my app.  I hate duplication of code like this, is there not a better way to prevent this situation?

this_record = form_name[ID == input.ID];
if(input.Modified_Time != this_record.Modified_Time)
{
      alert "You can't submit this form because the record has changed while you had the form open";
      cancel submit;
}