Comments (7)
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.
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.
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.
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.
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.
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.
Added an implementation of this into master along with example.
from alpaca.
Related Issues (20)
- Layout/template for ArrayField items?
- format: uri does not accept an IP address HOT 1
- Multiselect order
- Add new item in Array object with multiple selected
- Plans on proceeding with broken TAG-field?
- [Ask] change helper text color
- [Ask] Accessing options of a field from another field
- How do I trigger the per-field validation chain when ANY field changes on the form?
- "too much recursion" with jQuery 3.4 using enum
- textarea data not being set properly
- Missing null checkes
- When Creating A Form Builder, How do I make the checkbox multiple select to be true as default? HOT 1
- Conditional Dependency failing
- Field is excluded in the Alpaca.getValue() when dependent on hidden field
- Unable to set uploaded images in postRender
- Repo Future? HOT 3
- After load form and the first running function in the 'events > change' in the select field the validation stops work
- Is this a bug with the "valid" and "invalid" callbacks inside a View?
- Alpaca Gitana
- $('MyForm').alpaca() causes "Maximum call stack size exceeded" for specific Select Field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpaca.