In ServiceNow, data policies are almost similar to UI policies. Data Policies facilitate a developer to enforce online data policies by assigning read-only attributes for all the fields.
Following is a list of some main differences between data policy and UI policy:
UI policy only applies to data entered on a form by using a standard browser. On the other hand, data policies can apply rules for every data entered into the system.
Unlike the UI Policies, Data Policies execute server-side.
UI Policy logic only applies to data entered in a form, and the developers cannot apply scripts to Data Policies.