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

Can't save content after clearing property with validation error #7647

Closed
DempseySbaiz opened this issue Feb 12, 2020 · 3 comments · Fixed by #7662
Closed

Can't save content after clearing property with validation error #7647

DempseySbaiz opened this issue Feb 12, 2020 · 3 comments · Fixed by #7662

Comments

@DempseySbaiz
Copy link

When you save a content item with a non-required field, but with url validation, and fill in a wrong format, the validation error comes up and blocks the save. When you clear the field, the validation error does not go away, and you have to type something new in the field, even though it's non-required.

I am seeing this issue on Umbraco version: 8.5.3

Steps to reproduce:

  1. Create new document type with a property thats not required, but has validation (url validation).
  2. Create new content of this type, enter a wrong url format, and save the content.
  3. Validation message comes up and blocks the save, this is correct behaviour.
  4. Now clear the field with the validation message
  5. Try to save again, Umbraco still displays the validation message and blocks the save, even though the field is not required and has an empty value.
@nul800sebastiaan
Copy link
Member

Ah yes, that's interesting. I can reproduce (see below). We'd love a hand in helping to fix it!

7647

@umbrabot
Copy link

Hi @dsbaiz,

We're writing to let you know that we've added the Up For Grabs label to your issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post

Thanks muchly, from your friendly PR team bot :-)

@nathanwoulfe
Copy link
Contributor

Not sure if it's just me, but the save completes successfully with an invalid property. In some ways that makes sense, because it's only a save and a regex-based validation so won't break anything.

Validation definitely isn't clearing when the field value is empty. Trying to find a property to indicate the field is not required, to use that as an indicator for clearing the error message...

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

Successfully merging a pull request may close this issue.

5 participants