Skip to content

Update validation on destination create / edit #246

@samrooke

Description

@samrooke
Contributor

Is your feature request related to a problem? Please describe.
We require more validation in MIG when creating and updating destinations.

Describe the solution you'd like
Destination Name and AETitle both require validation to not allow special characters (non a-z, A-Z, 0-9) or spaces.

Destination Address requires new validation to only allow a valid IP address value or a valid hostname. Examples of regex for both are below:
IP address regex

^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

Hostname regex

^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-][a-zA-Z0-9]).)([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$

Destination Port requires new validation to only allow port numbers between 1 and 65535. Example regex below:

^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$

Activity

mocsharp

mocsharp commented on Dec 6, 2022

@mocsharp
Collaborator

Closing as completed in #261

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mocsharp@samrooke

        Issue actions

          Update validation on destination create / edit · Issue #246 · Project-MONAI/monai-deploy-informatics-gateway