Comments (12)
an additional guide on inline validation in web forms:
http://www.alistapart.com/articles/inline-validation-in-web-forms/
also, a nice reminder about what to do/what not to do in forms:
http://www.alistapart.com/articles/sensibleforms/
from surveyor.
http://www.smashingmagazine.com/2010/06/15/spice-up-your-website-with-jquery-goodness/
from surveyor.
For NCS need to verify the formats of various inputs. Ex :
FORMAT MUST BE AA # # # # # # #-UR##
from surveyor.
So, to be clear: there is no support for validation of answers? What about validation of a collection of answers (e.g., a_1 + a_2 + a_3 == 100)?
from surveyor.
There is on the back end, but it doesn't appear in the UI yet. We don't have a syntax yet for the validation of a collection of answers. But there are dependencies that could work on a collection of answers.
from surveyor.
Moving validations to the client side would have the same effects as moving dependencies to the client side - a lack of awareness of responses outside of the current section. We should build consensus on how to implement this both in the short and longer terms.
from surveyor.
I'm hesitant to add this to the core UI. Different people will want to handle invalid answers differently. I've had two separate requests/workflows from users on how to handle invalid questions. If we do implement in the core, it should be in a way that's easy to turn off or override.
from surveyor.
I agree with @kumbafu — Surveyor should not enforce validations unless that enforcement can be customized/disabled. It should provide a mechanism that:
- Allows defining validations for questions in the DSL
- Allows for determining if a particular response is valid/invalid
- Allows for determining the set of valid/invalid responses in a response set
It may also need to provide an extension point for displaying validation messages in the UI. I'm not quite sure how that would work; maybe one part would be including validation information in the AJAX HTTP response when a question response is submitted.
It may also be worthwhile to make the validation syntax in the DSL extensible so that applications can define their own sorts of validations.
I've had two separate requests/workflows from users on how to handle invalid questions.
@kumbafu, it would be helpful to have the parameters for those workflows to ensure that Surveyor's validation implementation would enable (and not obstruct) them.
from surveyor.
The two workflows I've been asked for are:
- To be able to highlight invalid responses (but allow the form to be filled out/completed)
- Disallow completion of forms that have invalid responses.
from surveyor.
We will implement:
Client side: mandatory questions and data types (e.g. integer, date, string)
Server side: validations as defined in the DSL with rules and validation conditions
from surveyor.
was this implemented?
from surveyor.
No issue #34 has not yet been implemented.
There is a branch[1] that was started which uses Jquery.validations[2][3]
and it works for the most basic scenarios[4].
However this was just a start and there are several other issues to
address before being anywhere near Œcomplete¹.
Hopefully I, or someone, can pick it up again soon.
Kind regards,
Paul
[1] https://github.com/NUBIC/surveyor/compare/34_support-validations
[2] http://bassistance.de/jquery-plugins/jquery-plugin-validation/
[3] http://docs.jquery.com/Plugins/Validation
[4]
https://github.com/NUBIC/surveyor/blob/37a5e9a68e4bdfde020a7e42c0b15299e8c9
9009/lib/assets/javascripts/surveyor/surveyor_validations.js
From: Alessandro Lepore [email protected]
Reply-To: NUBIC/surveyor
<reply+i-80881-b594b9a6c5e393df7fcf71d7ca4f482c24d04d05-34622@reply.github.
com>
Date: Saturday, May 31, 2014 at 6:34 AM
To: NUBIC/surveyor [email protected]
Cc: Paul Friedman [email protected]
Subject: Re: [surveyor] support validating responses in the UI (#34)
was this implemented?
‹
Reply to this email directly or
view it on GitHub
#34 (comment).
from surveyor.
Related Issues (20)
- Rails 4.1 breaks models/response_set_spec
- Rails 4.1 breaks parser for quizzes HOT 1
- Dependent answers
- Survey translation and url HOT 1
- Missing image backgrounds for popups (slider, etc)
- Document usage of "display_type" HOT 1
- Add support for Rails 4.2 HOT 7
- `<module:Formtastic>': uninitialized constant Formtastic::SemanticFormBuilder (NameError) HOT 4
- undefined method `question_group=' HOT 1
- Installation instructions on GH pages should format bash scripts differently
- Could not find generator surveyor:install HOT 1
- rails generate surveyor:install fails
- Possibility to have different thank you pages
- custom table name
- Translations seemingly ignored HOT 3
- SurveyorController Pundit authorization
- Surveyor with Act as taggable on gem
- Add support for Rails 5.x
- NameError: uninitialized constant Formtastic::ActiveSupport HOT 1
- 这是一个问卷系统吗? HOT 1
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 surveyor.