rajalakshmys-27 commented on code in PR #3388:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3388#discussion_r2670745651


##########
packages/uniforms-patternfly/src/wrapField.tsx:
##########
@@ -50,7 +50,7 @@ filterDOMProps.register(
 
 type WrapperProps = {
   id: string;
-  error?: boolean;
+  error?: boolean | object;

Review Comment:
   Thank you for the review.
   
   To clarify, the error type in Uniforms depends on the schema bridge in use:
   
   - With uniforms-bridge-simple-schema-2, error can still be a plain boolean 
(true), with the actual message provided separately via errorMessage.
   
   - With uniforms-bridge-json-schema (AJV), error is a structured object that 
follows a known format (instancePath, message, keyword, params, etc.). 
   
   In this PR, the type was updated from boolean | object to boolean | 
ValidationError. 
   
   This documents the expected AJV shape when present, while still allowing the 
legacy boolean case. Since the codebase includes both bridges, we need to 
support both scenarios.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to