-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add ability to validate Link and Embedded url #1378
base: master
Are you sure you want to change the base?
Conversation
heightValid, | ||
widthValid, | ||
} = this.state; | ||
console.log('heightValid', heightValid); |
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 should be removed
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.
Fixed in 7f61272
@@ -104,6 +104,7 @@ export default "{\n" + | |||
" component: undefined,\n" + | |||
" popupClassName: undefined,\n" + | |||
" embedCallback: undefined,\n" + | |||
" embedValidator: undefined,\n" + |
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.
linkValidator field is missing in this file
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.
Fixed in 7f61272
Thanks for providing a great library @jpuri
I needed the ability to validate the links so I have created this PR to add config options to validate the urls input for Link and Embedded
linkValidator
config options to provide functions to validate Link targetembedValidator
config options to provide functions to validate Embedded urlThis is partly based on #355, however it does not provide "allowRelative" link functionality nor prepends links with 'https://'. Both should be possible with a combination of the new
linkValidator
and the existinglinkCallback
Possibly related to #483