Giter Site home page Giter Site logo

Comments (7)

uzquiano avatar uzquiano commented on August 15, 2024

I agree with this. All those validation messages when the user hasn't done anything yet can be quite intimidating.

We'll get this into the 1.0.4 release.

from alpaca.

drq avatar drq commented on August 15, 2024

For "Creating New" forms, that is very true. However, for "Editing Existing" forms, we may want to turn it off. Anyway, we will need to do more research before making that change.

At the mean time, you can display the hidden messages using this API in your postRender callback function

renderedForm.showHiddenMessages();

from alpaca.

uzquiano avatar uzquiano commented on August 15, 2024

I pushed in a change to master so that any views of type 'create' (such as VIEW_WEB_CREATE) will initialize the hideInitValidationError field to true. I also added some examples to the validation-examples.html file. It seems to work pretty well for the cases I've tried.

Just add:

"view": "VIEW_WEB_CREATE"

To your $.alpaca() call and all of the red invalid state boxes will not be rendered on the first pass.

from alpaca.

JocelynDelalande avatar JocelynDelalande commented on August 15, 2024

Ok, logical enough, but won't do the trick for a non-create form with an ArrayField in which we add (plus button) a new row.

For the record, uzi's commit is 1d92ea3

from alpaca.

uzquiano avatar uzquiano commented on August 15, 2024

Got it. Okay, sounds like we still have a little more to resolve on this issue.

It sounds like regardless of the view type, when someone clicks "add" on the array toolbar, the new element should have hideInitValidationError true by default. Does that seem correct to you?

That logic should hold for any container field (objects, etc).

from alpaca.

JocelynDelalande avatar JocelynDelalande commented on August 15, 2024

It sounds like regardless of the view type, when someone clicks "add"
on the array toolbar, the new element should have
hideInitValidationError true by default. Does that seem correct to you?

Yep

from alpaca.

uzquiano avatar uzquiano commented on August 15, 2024

Added an implementation of this into master along with example.

from alpaca.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.