ServerSide Validation
            
            #1178
          
          
        -
| Scope: <DESCRIBE SCOPE OF THIS ISSUE, i.e.: PF4 mapper, Form renderer> Description | 
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            rvsia
          
      
      
        Dec 6, 2021 
      
    
    Replies: 1 comment
-
| Hello, in your submit function you have to return an object with errors. Check this example: https://stackblitz.com/edit/2qj4zm?file=index.js         <FormRenderer
          schema={schema}
          FormTemplate={FormTemplate}
          componentMapper={componentMapper}
          onSubmit={async () => {
            await sleep(1500); // do your API callback
            return { 'first-name': 'already taken' };
          }}
        /> | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        Hyperkid123
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Hello,
in your submit function you have to return an object with errors.
Check this example: https://stackblitz.com/edit/2qj4zm?file=index.js