Suppose I have numerous form fields that need to be displayed on the user interface. Additionally, in a standard Modify workflow, let's assume that these fields will have various attributes like value, mandatory, editable, disabled, label, regex (for validation), and more.
While "value" would need to come from the service as it is a persisted database value, should other attributes/flags such as mandatory, editable, etc also be returned from the service? These attributes might be determined by certain business logic (e.g. whether a field is editable based on a specific workflow status).
Is it preferable to avoid including anything related to business logic in the UI, or should attributes like mandatory, editable, etc be kept on the UI since they are UI-specific? Any references on this topic would be greatly appreciated.