What problem does it solve?
Setting validation logic directly on attribute definitions can be error-prone and inconsistent when done manually or across environments. This Skill centralizes the process of applying JavaScript validation code (attribute 1008) to attribute definitions so input is validated server-side and consistent across branches.
Core Features & Use Cases
- Apply Validation Code: Update an existing attribute's validation script to enforce input rules at the server level.
- Structured API Usage: Uses novadb_cms_update_objects format with branch, object meta, and CmsValue entries (attribute 1008, language 0, variant 0).
- Use Case: Enforce country code formats or non-negative numeric constraints by placing concise JavaScript checks on attribute definitions.
Quick Start
Set the JavaScript validation code on the target attribute by calling novadb_cms_update_objects with the branch ID, the attribute meta.id and typeRef 10, and a values array containing attribute 1008 with the validation script.