New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support passing a static validation message #1486
Conversation
@@ -14,9 +15,10 @@ export interface ValidationMessageProps { | |||
*/ | |||
validationMessageStyle?: TextStyle; | |||
retainSpace?: boolean; | |||
validate: FieldStateProps['validateOnChange']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate: FieldStateProps['validateOnChange']; | |
validate?: FieldStateProps['validateOnChange']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow this FieldStateProps['validateOnChange']
is a boolean
value, and it creates typing errors in the demo-screen on validate
prop, that getting there an array of strings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* Support passing a static validation message regardless to the validate prop * Fix typing * Fix validate typing
* Support passing a static validation message (#1486) * Support passing a static validation message regardless to the validate prop * Fix typing * Fix validate typing * Add leading accessory to example * Update TextField formatter signature
Description
Support rendering a validation message in Incubator.TextField component regardless to validate prop
If the user just passed
validationMessage
withoutvalidate
prop, we just the render the message with no conditionFix #1485
Changelog
Support passing a validation message to Incubator.TextField component regardless to validate prop