+
Skip to content

Extend validation in admin endpoints #26731

Open
@stianst

Description

@stianst

Description

There's quite a few bugs that are opened due to lack of proper validation in admin endpoints, and we should prioritise adding better validation. This could either be done on the representation level, or on the model level.

Doing it at the representation level means we can validate values before updating the model, but on the other hand doing it at the model level would catch any direct updates that are not going through representations.

In either case a annotation based approach, like Hibernate Validator, may be preferable.

Adding validation may result in breaking existing deployments; this would be in favour of adding validation at the representation level, and make it possible to disable validation (at least for a while).

This will also likely to require some changes to the Admin UI, for example it will currently sending empty strings for some values, but this should not be permitted by validation on the server-side.

We will probably not be able to cover validation of everything initially, but we should have a framework that can easily be extended on.

Collection of related issues

Discussion

N/A

Issues

No response

Motivation

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载