VBCS form validation not triggering custom business rules on account save

I’ve created custom validation logic in a VBCS extension for the Account create/edit form. The validation rules check for duplicate account names within the same industry and enforce specific data quality requirements (phone format, email domain matching company name, etc.). The VBCS form validators execute correctly and display error messages in the UI, but when users click Save, the account record is created anyway, bypassing our custom rules.

Here’s a sample of our VBCS validation action chain:

if (accountName.length < 3 || industryCode == null) {
  return { valid: false, message: 'Invalid data' };
}
return { valid: true };

The validation fires on field blur and shows the error message, but the Save button remains enabled and the REST API call to create the account succeeds even when validation returns false. I’ve confirmed the business rules are properly configured in Application Composer. Is there a disconnect between VBCS client-side validation and the server-side business rule enforcement? How do we ensure validation actually blocks the save operation?

Here’s the comprehensive solution addressing all validation layers:

1. VBCS Form Validation Fix: Modify your Save button action chain to explicitly validate before saving:

// Action Chain: saveAccountAction
// Step 1: Call Component Method
const validationResult = $page.functions.validateAccountForm();

// Step 2: If Condition
if (!validationResult.valid) {
  // Show error notification
  return;
}
// Step 3: Call REST - createAccount

In your page functions, implement validateAccountForm():

validateAccountForm() {
  const form = document.getElementById('accountForm');
  const isValid = form.valid;
  return { valid: isValid };
}

2. REST API Interceptors: Create a custom REST interceptor in VBCS to enforce validation before API calls:

  • Navigate to your VBCS application settings
  • Add a Request Transform interceptor for the Account REST endpoint
  • Implement validation logic that checks payload data before transmission
  • Return error responses for invalid data to prevent the API call

Example interceptor logic:

if (!payload.AccountName || payload.AccountName.length < 3) {
  throw new Error('Account name must be at least 3 characters');
}

3. Business Rule Enforcement (Server-Side): Configure Oracle CX Application Composer business rules:

  • Go to Configuration > Application Composer > Account Object
  • Create Validation Rules for each business requirement
  • Set Rule Type to ‘Error’ to block saves
  • Example: “Account Name Length” rule with condition: LEN(AccountName) < 3
  • Enable “Always Evaluate” to ensure rules fire regardless of UI

For duplicate checking, create a custom validation rule:

  • Condition: COUNT(Account WHERE Name = :NEW.Name AND Industry = :NEW.Industry) > 0
  • Error Message: “Account name already exists in this industry”

4. Client-Server Validation Sync: Ensure consistency between VBCS and server-side rules:

VBCS Validator Configuration:

  • Bind validators to form fields using the validators property
  • Use async validators for duplicate checking via REST calls
  • Implement real-time validation on blur/change events

Synchronization Pattern:

  • Maintain a validation rules configuration file shared between VBCS and server
  • Use the same validation logic expressions in both layers
  • For complex rules, call a server-side validation REST endpoint from VBCS before save

Complete Save Flow:

  1. User fills form → VBCS validators fire on field blur (immediate feedback)
  2. User clicks Save → Action chain validates entire form
  3. If VBCS validation fails → Show errors, block save
  4. If VBCS validation passes → Call REST API
  5. Server-side business rules execute → Final validation
  6. If server rules fail → API returns error, display to user
  7. If all validations pass → Account created successfully

Best Practices:

  • Always implement validation at both client and server layers
  • Use VBCS validation for UX (immediate feedback)
  • Use business rules for data integrity (security boundary)
  • Test validation bypass scenarios (direct API calls, bulk imports)
  • Document validation rules in both VBCS and Application Composer
  • Use consistent error messages across layers

This multi-layered approach ensures that validation cannot be bypassed regardless of how users interact with the system, while maintaining a good user experience with immediate client-side feedback.


This draft is based on general Oracle CX Cloud knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

VBCS client-side validation is purely UI-focused and doesn’t automatically prevent REST API calls. You need to explicitly check validation state before executing the save action chain. In your button action, add a condition that checks all form validators before calling the REST endpoint. The validation framework provides a validateForm() function that returns the overall validation state.

The issue is that VBCS form validation and Oracle CX business rules operate at different layers. VBCS validation is JavaScript-based client-side checking, while business rules execute server-side during the actual database transaction. They don’t automatically synchronize. You have two options: either implement REST API interceptors to enforce validation before the create call, or configure server-side validation rules that mirror your VBCS logic. We typically use both approaches for defense-in-depth - client validation for UX, server validation for data integrity.

I experienced this exact problem. The root cause is that VBCS doesn’t block form submission by default even when validators return invalid results. You must modify your Save button’s action chain to call the form validation explicitly and conditionally execute the REST call only if validation passes. Check the VBCS component’s ‘valid’ property in your action chain logic.

Thanks for clarifying the architecture. So if I understand correctly, I need to add a validation check step in my Save button action chain before the REST call? What’s the proper way to access the form’s validation state in the action chain?

Use the Call Component Method action in your action chain to invoke the form’s validate() method. This returns a boolean indicating whether all validators passed. Store the result in a variable, then use an If action to conditionally execute your REST call only when validation succeeds. Also, make sure your validators are properly bound to the form fields using the validators property on each input component.

Don’t forget about REST API interceptors as a complementary approach. Even with proper VBCS validation, users can bypass the UI entirely and call the REST API directly via tools like Postman or custom integrations. Implement server-side validation using Oracle CX business rules or create custom REST interceptors that enforce your data quality rules at the API layer. This ensures data integrity regardless of how accounts are created.