IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Custom validation in Business Console

    Posted 10/17/18 07:03 AM

    Hello,

    We are in a process of developing the gadgets for some business requirements. As per documentation, we have to use the bc-validate directive for form validation. But how can we achieve some sort of custom validation like,

    1. Date Range Check
    2. Special character check etc. ?

    Is there any way to customize/overried the default validation framework ?

    Any help would be much appreciated.

    Regards,
    Anish


    #webMethods
    #webMethods-BPMS
    #BPM


  • 2.  RE: Custom validation in Business Console

    Posted 10/18/18 04:46 AM

    You can try to do something like this with a custom function to invoke it. Invoke your custom function on an event like ng-change

    have your validation rules in the function and bind a respective user friendly validation message. Let us know if its suffice.

    $scope.isValidDate = function(startDate,endDate) {
    $scope.errorMessage = ‘’;
    var curDate = new Date();

    if(new Date(startDate) > new Date(endDate)){
    $scope.errorMessage = 'End Date should be greater than start date';
    return false;
    }
    if(new Date(startDate) < curDate){
    $scope.errorMessage = 'Start date should not be before today.';
    return false;
    }
    

    };

    Start Date:

    End Date:

    {{errorMessage}}


    #BPM
    #webMethods
    #webMethods-BPMS