Skip to content
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

Merged
merged 3 commits into from
Feb 6, 2018

Conversation

soupette
Copy link
Contributor

@soupette soupette commented Feb 5, 2018

Created InputEmail and InputEmailWithErrors components

Reorganize Inputs*WithErrors props and add noErrorsDescription prop so it can set a spacer in order to keep the inputs' alignment correct

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');
Copy link
Member

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,}))$/);
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants