Javascript updates for multiple issues, improved JSLint, and new submit callback #11

merged 28 commits into from Aug 15, 2011


None yet

2 participants


This includes fixes for:

  • Case 6 - Updating date validation regex to support leading zeroes
  • Case 15 - Prevent data type casting with default values to allow numbers in format of 100.00
  • Case 9 - Support for HTML5 autofocus attribute
  • Case 7 - Initial implementation of a new submit_callback function to allow for additional validation on a form before submission. It's not ideal yet, but it does work
  • Updating of the email validation to allow for gmail style addressing
  • JS Lint improvements to clean up the global namespace and make formatting more uniform.

This should be completely backwards compatible, and a unit testing suite is included for all of the new features.

LearningStation added some commits Feb 28, 2011
@LearningStation LearningStation Case 6 : Adding test case for leading zero format for month and days …
…value: valid 01/01/2001
@LearningStation LearningStation Case 6 : Adding new validation expression to allow leading zeros on d…
…ate format 11/01/2011
@LearningStation LearningStation Updating minified JS with latest 3b94f84
@LearningStation LearningStation Updating test runner with latest locations of qUnit and qUnit CSS rules 65747e4
@LearningStation LearningStation Merge branch 'master' of 3a378fb
@LearningStation LearningStation Update test runner to use minified version of the script. a9d7026
@LearningStation LearningStation Updating email validator to support google style + addressing. ee31053
@LearningStation LearningStation Ignore the new build script used to keep the minified script in sync. e1bbcc8
@LearningStation LearningStation Adding min.header.js to the ignore list
This file is used by the build script to add the copyright header to the
minified file. Minification is now done with the OSX version of
@LearningStation LearningStation Updating the validation library to improved JS lint standards 9fc9586
@LearningStation LearningStation Adding unit test for Issue 15 : Default data string type conversion
Test currently fails. It appears that $.data() is type casting the
100.00 to be a int of 100.
@LearningStation LearningStation Fix for case 15 : Using .attr() instead of .data() to prevent type co…

* Adding unit test for default value hiding behavior * Updating unit
test for case 15 * Updating library to use .attr() instead of .data() -
prevent type conversion of decimal numbers as default values.
@LearningStation LearningStation Adding test for Issue 9 : Handle html5 autofocus rule correctly
Failing test, pending development.
@LearningStation LearningStation Fix for Case 9 : Compatibility with HTML5 autofocus attribute
The autofocus attribute was causing the form element to be selected
without a focus() event. This was preventing Uni-Form from highlighting
the element. This has been fixed and tested.  Please note that as a side
effect of the testing, we had to add a small hack to the form.js test
file. The autofocus attribute does cause a change in the form value.
This means there is a bug when you use autofocus + ask_on_leave +
default data together. I feel that this is a small enough issue to
ignore for the moment.
@LearningStation LearningStation Double checking Case 3, 14 : Ensure that the default data is not subm…
@LearningStation LearningStation Small jslint update 77854bd
@LearningStation LearningStation Update to call prevent_submit_callback() with the same parameters as …

This is sourced from a pull request by valmynd
@LearningStation LearningStation Add get_label_text() method to refactor the fetch of labels
This is sourced from a commit by rrae at
@LearningStation LearningStation Maintain an errors object with a list of all of the messages for the …
…current form

This is sourced from
This could have been fetched in a round about way with something like
$('#form-id div.ctrlHolder.error p.formHint') but this will be much more
@LearningStation LearningStation Add unit test for the new submit_callback option
Test currently fails. Not yet implemented.
@LearningStation LearningStation Cleaning up global namespace in the testing suite 670d566
@LearningStation LearningStation Unit test messages updated. qUnit style, not phpUnit style. 1eaeb94
@LearningStation LearningStation Issue 7: Initial commit of submit callback
* Additional jslint work in validation library * Updating form test to
match new arguments in submit_callback
@LearningStation LearningStation Fixing a search and replace error s/isfunction/isFunction 528b087
@LearningStation LearningStation Issue 7 : Testing submit_callback with the new checkboxes demo
We still have a sequencing problem with this, the submit callback can't
clear errors before the regular validators run. We may need to shift
this around.  Additionally, the showFormErrors and showFormSuccess have
been moved. I'm not a huge fan of name spacing this way, but it does
@LearningStation LearningStation Updating the order in which the submit callback is executed.
This allows the callback to set error states, although not with an
method call. Instead with error classes.
@LearningStation LearningStation Disabled the Case 9 autofocus test when the browser does not support it. a621649
@LearningStation LearningStation Updating autofocus feature detection in the issue tests 99283cd
@draganbabic draganbabic merged commit a35c96c into draganbabic:master Aug 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment