You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Back Date Validation rule in Transfer page is not working

edited Aug 11, 2026 11:50AM in Visual Builder Studio for HCM 6 comments

Summary:

Hi All,

I'm trying to validate the action date is not a past date in Transfer pages using the validation rule in VBCS, but its not working as expected. Any suggestions, below is the code

/* eslint-disable dot-notation */define([], () => {  'use strict';
  /**   * Hex back date validation   * @param {object} context   * @return {boolean}   */ 

function isValidActionDate(context) { 

const { $fields, $componentContext, $modules, $user } = context; 

const actionDate = $fields.employmentWhenAndWhy.ActionDate.$value(); 

const currentDate = new Date().toISOString().split('T')[0]; if (actionDate < currentDate)}


  /**   * Hex back date validation   * @param {object} context   * @return {boolean}   */  function runCondition(context) {    const { $componentContext, $fields, $modules, $user } = context;
    if ($modules.hexBackDateValidation.runCondition) {      return true;    }
    return false;  }

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!