Skip to content

Drive Validations based on values returned from REST controller. #521

@atreya-yelishetti

Description

@atreya-yelishetti

Code Sample:

ValidationRules
.ensure('id').displayName('ID').required().then().

Current behavior:

If code is bundled with webpacks, and later on we decided id is not a required field, we need to make code changes by removing .required() on a property and rebundle with webpack and deploy it

Expected/desired behavior:

Consider I have a REST CONTROLLER which says if that is required or not. Based on a value of a key I would like to dynamically set id as required or not required.

if the controller returns as below json, I would like id to be required:
id:{
required:true;
}

if the controller returns as below json, I would like id to be not required:
id:{
required:false;
}

I've already implemented a service which does that for me, Can I know how to achieve this on UI with Aurelia-Validation framework.?

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

    Issue actions