I'm following the instructions here to create custom validation for a Lightning Component in my Flow:

Available For Flow Screens

Custom Validation

Salesforce validates each flow screen when the user attempts to navigate to the next screen. If the flow screen is not valid, the user can’t progress. To validate the component with the flow screen, declare the validate attribute in the component. Set the validate attribute to a custom validation function that must return two parameters: isValid and errorMessage.

The validation works, and the error message is displayed, but its at the very bottom of the component. Is there a way I can control placement of the error message, like to somewhere closer to the top of the component? Right now it displays after my custom component and the footer button bar:

enter image description here

  • Were you able to control placement of the error message (Maybe show to the top of the component)
    – lambad
    Sep 18 '20 at 6:17

I wound up hiding the Flow footer and creating my own [Next] button. Clicking the [Next] button triggers JS controller code that validates the input.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.