Commit 488ad34a authored by Florent Chehab's avatar Florent Chehab

Textfield improved

parent cbd26501
......@@ -29,10 +29,10 @@ class TextField extends Field {
if (this.props.maxLength && value.length > this.props.maxLength) {
messages.push("L'URL est trop long.");
}
if (this.props.isUrl && !isUrl(value)) {
if (this.props.isUrl && value != '' && !isUrl(value)) {
messages.push("L'URL entrer n'est pas reconnu.")
}
if (this.props.isUrl && this.props.urlExtensions.length > 0) {
if (this.props.isUrl && value != '' && this.props.urlExtensions.length > 0) {
if (!stringHasExtension(value, this.props.urlExtensions)) {
messages.push("Extension de l'URL non conforme")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment