{"ref":"artifact:mertsap-capval","page":"/artifacts/mertsap-capval","json":"/artifacts/mertsap-capval.json","generated":"2026-10-26","drafted_with_ai":true,"entity":{"id":"mertsap-capval","name":"capval","artifact_type":"cds-plugin","ecosystem":"cap","domain":"security-and-compliance","origin_ring":"independent","description":{"one_line":"Replaces the message a failed [input validation](capability:input-validation) annotation returns, and adds `@validation.handler`, which names a class that runs a check of the developer's own.","short":"Custom messages and handler classes for CAP input validation","what_it_solves":"The default message for a failed `@mandatory` is `Value is required`, which in a multilevel form with many mandatory fields does not tell the user which field. `@validation.message` is annotated beside the standard annotations, such as `@mandatory`, `@assert.format` and `@assert.range`, and carries either the text or an `i18n>` key whose entry may hold `{{Travel-EndDate}}` placeholders that read values off the record under validation. `@validation.handler` points at a class extending `BaseValidation` and implementing `isValid`, which returns true or false; the class can read the field, its entity and a flat object of that entity and its parents up to the root, and capval works out the target and collates the errors. Those two annotations are what it introduces and there is no new constraint keyword: what a check may say is whatever `isValid` computes, and `@mandatory` and the `@assert` family remain [@sap/cds](artifact:sap-cds)'s."},"links":{"npm":"https://www.npmjs.com/package/capval","repo":"https://github.com/MertSAP/CAPVAL"},"identity":{"author":"MertSAP","license":"Apache-2.0"},"compat":{"runtimes":["node"],"cds_range":">=8.0.0"},"type_properties":{"distribution":{"value":["npm"],"sources":[{"url":"https://github.com/MertSAP/CAPVAL","title":"capval — README","checked":"2026-10-18","quote":"npm add capval"}]}},"provides":[{"capability":"capability:input-validation","what_it_does":"Overrides what a failed validation returns to the client: the message per element, resolved from the i18n bundle and able to interpolate values from the record, and a handler class whose `isValid` decides, with the target worked out by the plugin and the errors collated.","sources":[{"url":"https://github.com/MertSAP/CAPVAL","title":"MertSAP/CAPVAL — README","checked":"2026-09-26","quote":"SAP CAPVAL is a SAP Cloud Application Programming Model(CAP) plugin that aims to improve and extend the standard validations provided."},{"url":"https://github.com/MertSAP/CAPVAL","title":"MertSAP/CAPVAL — README","checked":"2026-09-26","quote":"To override messages all we need to do is place the @validation.message annotation alongside existing input validation annotations(@mandatory,@assert.format,@assert.range...)"},{"url":"https://github.com/MertSAP/CAPVAL","title":"MertSAP/CAPVAL — README","checked":"2026-09-26","quote":"Implementations must extend the BaseValidation class and implement the IsValid Method, returning true or false. CAPVAL will automatically determine the targets (in/to_Booking(BookingUUID etc etc), collate, and return the errors."},{"url":"https://github.com/MertSAP/CAPVAL","title":"MertSAP/CAPVAL — README","checked":"2026-09-26","quote":"Localisation is supported and dynamic contextual information can be provided."}]}],"maintainers":["actor:mertsap"],"provenance":{"discovered_via":[{"source":"source:curator"}],"first_seen":"2026-09-26"},"source_available":true,"drafted_with_ai":true,"contributors":["actor:mertsap","actor:michaelschmid-agi"]},"effective_normative_relations":[{"instrument":"instrument:sap-developer-license-3-2-cap","relation":"use-constrained-by","sections":["1","2","3"],"applies_when":"A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.","note":"This is inherited applicability, not a licence verdict about the artifact itself. Review the agreement for the actual materials and use; an explicit artifact relationship to another revision takes precedence.","scope":{"kind":"artifact"},"sources":[{"url":"https://cap.cloud.sap/resources/license/developer-license-3_2_CAP.txt","title":"SAP Developer License Agreement 3.2 CAP","checked":"2026-09-16","quote":"documentation, plug-ins, templates, scripts and sample code, libraries, software development kits"}],"inherited_from":"cap-plugins-and-applications","relevant_capabilities":["agent-systems-access","async-processing","data-import-export","database-connectors","deployment","destinations","llm-integration","mcp-servers","plugin-authoring","replication","retrieval-augmented-generation","rfc-connectivity"]}],"readings":{"liveness":[{"label":"Maintenance","tier":"poor","evidence":"17 months since release"},{"label":"Continuity","tier":"good","evidence":"3 contributors, 1 publisher"},{"label":"Repository","tier":"good","evidence":"pushed 2026-04, not archived"}],"compatibility":[{"label":"Declared for","tier":"good","evidence":">=8.0.0 — includes cds 10 and 9"},{"label":"Survived majors","tier":"poor","evidence":"no release since @sap/cds 10 shipped (July 2026)"},{"label":"Maintainer's CI","tier":"fair","evidence":"workflows present, no completed run on the default branch"}],"practice":[{"label":"Tests","tier":"good","evidence":"23 test files, npm test"},{"label":"Docs","tier":"good","evidence":"README 6 KB"},{"label":"Changelog","tier":"fair","evidence":"none in the repo"}],"reach":[{"value":2,"unit":"installs/week","note":"More people watching than installing — noticed deliberately rather than pulled in."},{"value":13,"unit":"watching"}]},"signals":{"crawled_at":"2026-10-26","latest_version":"2.0.6","majors":{"1":{"version":"1.0.0","date":"2024-01-06"},"2":{"version":"2.0.0","date":"2024-08-25"}},"license":"ISC","first_release":"2024-01-06","last_release":"2025-05-21","releases":18,"cadence_days":10,"maintainers":1,"repository":"git+https://github.com/MertSAP/CAPVAL.git","repository_directory":null,"peer_cds":null,"test_script":true,"types":false,"downloads_weekly":2,"stars":13,"forks":1,"open_issues":2,"archived":false,"pushed_at":"2026-04-07","license_spdx":"Apache-2.0","org_owned":false,"default_branch":"main","contributors":3,"tree_truncated":false,"test_files":23,"workflows":3,"other_ci":false,"readme_bytes":6338,"docs_files":0,"changelog":false,"license_file":true,"dts_files":0,"first_commit":"2024-01-05","last_commit":"2025-05-21","commits":141,"readme_path":"README.md","readme_sha":"7949b91a5b00f1f7e1acdbdbd114f10e71f38d66","months_since_release":17,"dormant":true,"dependencies":2,"node_engine":null,"downloads_monthly":82,"created_at":"2024-01-05T12:26:30Z","open_prs":2,"repo_read":"2026-10-26"},"release_notes":{"license":"Apache-2.0","quotable":true,"source":{"kind":"github-releases","url":"https://github.com/MertSAP/CAPVAL/releases"},"format":"github-releases","releases":[{"version":"2.0.6","date":"2025-05-21","date_source":"github","heading":"2.0.6 - Dependency updates","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.6","sections":[],"hash":"c68a1c4be7318f39"},{"version":"2.0.5","date":"2024-11-17","date_source":"github","heading":"2.0.5","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.5","sections":[],"hash":"e40a82f4b27c531f"},{"version":"2.0.4","date":"2024-11-02","date_source":"github","heading":"2.0.4","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.4","sections":[],"hash":"1b26afe11a555782"},{"version":"2.0.3","date":"2024-10-29","date_source":"github","heading":"2.0.3","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.3","sections":[],"hash":"2cece90278a7fc0d"},{"version":"2.0.2","date":"2024-10-20","date_source":"github","heading":"2.0.2","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.2","sections":[],"hash":"2bf1d461638a1081"},{"version":"2.0.1","date":"2024-09-21","date_source":"github","heading":"Dependency updates for express","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.1","sections":[],"hash":"e3b0c44298fc1c14"},{"version":"2.0.0","date":"2024-08-25","date_source":"github","heading":"CAPVAL Version 2.0.0","url":"https://github.com/MertSAP/CAPVAL/releases/tag/2.0.0","sections":[],"hash":"0740ce6e14e3fbfb"},{"version":"1.2.6","date":"2024-08-20","date_source":"github","heading":" Contextual Information Updates","url":"https://github.com/MertSAP/CAPVAL/releases/tag/1.2.6","sections":[{"kind":"other","heading":null,"items":2}],"hash":"99fb1fc0464753b5"},{"version":"1.2.5","date":"2024-08-18","date_source":"github","heading":"CAPVAL 1.2.5","url":"https://github.com/MertSAP/CAPVAL/releases/tag/1.2.5","sections":[{"kind":"other","heading":null,"items":4}],"hash":"127e2043adcb5f71"},{"version":"1.2.4","date":"2024-08-11","date_source":"github","heading":"CAPVAL 1.2.4","url":"https://github.com/MertSAP/CAPVAL/releases/tag/1.2.4","sections":[],"hash":"17c1ddd517895a3f"},{"version":"1.2.3","date":"2024-08-10","date_source":"github","heading":"CAPVAL 1.2.3","url":"https://github.com/MertSAP/CAPVAL/releases/tag/CAPVAL","sections":[],"hash":"e3b0c44298fc1c14"}],"versions":[{"version":"2.0.6","date":"2025-05-21"},{"version":"2.0.5","date":"2024-11-17"},{"version":"2.0.4","date":"2024-11-02"},{"version":"2.0.3","date":"2024-10-29"},{"version":"2.0.2","date":"2024-10-20"},{"version":"2.0.1","date":"2024-09-21"},{"version":"2.0.0","date":"2024-08-25"},{"version":"1.2.6","date":"2024-08-20"},{"version":"1.2.5","date":"2024-08-18"},{"version":"1.2.4","date":"2024-08-11"},{"version":"1.2.3","date":"2024-08-10"},{"version":"1.2.2","date":"2024-08-10"},{"version":"1.2.1","date":"2024-07-21"},{"version":"1.2.0","date":"2024-07-21"},{"version":"1.1.0","date":"2024-07-16"},{"version":"1.0.2","date":"2024-01-07"},{"version":"1.0.1","date":"2024-01-06"},{"version":"1.0.0","date":"2024-01-06"}],"crawled_at":"2026-10-25"},"edges":{"maintainers":[{"ref":"actor:mertsap","name":"MattBrightman","json":"/actors/mertsap.json"}],"contributors":[{"ref":"actor:mertsap","name":"MattBrightman","json":"/actors/mertsap.json"},{"ref":"actor:michaelschmid-agi","name":"MichaelSchmid-AGI","json":"/actors/michaelschmid-agi.json"}],"explained_by":[{"ref":"content:capval-a-project-is-born","name":"CAPVAL: A project is born","json":"/content/capval-a-project-is-born.json"},{"ref":"content:extend-cap-validations-with-the-capval-plugin","name":"Extend SAP Cloud Application Programming Model(CAP) Validations with the CAPVAL Plugin","json":"/content/extend-cap-validations-with-the-capval-plugin.json"}],"alternative_to_this":[],"needed_by":[],"available_via":[],"parts":[],"add_ons":[],"answered_through_parts":[]}}