-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
CreatedInputEmailWithErrors and associated documentation #576
Conversation
Reorganize Inputs*WithErrors props and add noErrorsDescription prop so it can set a spacer in order to keep the input s alignment correct
} | ||
|
||
handleFocus = (e) => { | ||
console.log('ok'); |
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.
Log
} | ||
|
||
validate = (value) => { | ||
const emailRegex = new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/); |
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.
Should we use the strapi-helper-plugin/utils
to share this function across the admin panel? I think it would be better instead of repeating this kind of validators everywhere in our codebase.
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.
Agree I'll move this function in the utils but I prefer to do it once the lib is completely implemented to avoid conflicts and make sure I have all the validations set
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.
Make sense!
Created
InputEmail
andInputEmailWithErrors
componentsReorganize Inputs*WithErrors props and add
noErrorsDescription
prop so it can set a spacer in order to keep the inputs' alignment correct