Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

No warning on saving new block if mismatched types #490

Open
webstationhq opened this issue Dec 4, 2019 · 1 comment
Open

No warning on saving new block if mismatched types #490

webstationhq opened this issue Dec 4, 2019 · 1 comment

Comments

@webstationhq
Copy link

I recently used the free version of block lab and found a bug/possible enhancement (you decide - I can write patch if needed).

To reproduce:

  1. Add a new block (name it whatever)
  2. Add a new field. Make the field type "email"
  3. On the default value, make it "foo"
  4. Close the field using the "Close Field" button
  5. OPTIONAL: Add other fields. I added 12 before I tried to publish.
  6. Try to publish the new block.

There is no visible warning. If you try to publish prior to step 4, you will see a warning that pops up using bootstrap validation on the default value field. Once the field is closed, there was no visible warning.

Browser: Chrome/OSX

Why: We often add many fields and change many field values prior to saving. since you can only have one field inspector open at a time, if the error occurs in a closed field, there is no warning. This causes a bit of confusion.

Resolution: Global warning? Switch validation to occur on the field close event and cancel the close until the problem is rectified?

@kienstra
Copy link
Collaborator

kienstra commented Dec 4, 2019

Hi @webstationhq,
Thanks a lot for bringing this up, and for your great steps to reproduce. I've also seen this.

I'll look at this in more detail, you're right that it's strange that there's no visible warning, even though it doesn't work.

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

No branches or pull requests

2 participants