• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog »
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

animation event node liferay datatable foxxtrot model plugin satyam yql jafl davglass form greghinch io async widget nzakas ericf table apipkin lsmith caridy css solmsted

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Form Manager CSS Validation (gallery-formmgr-css-validation) on cdn

    Last Updated: 05/10/12
    + 0 -

    John Lindal

    YUI Contributor

    See 43 more by this user.

    Created: 04/6/11
    Last CDN Push: 7 hours ago
    Build Tag: gallery-2012.05.16-20-37
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.5.1
    Free for use.

    Utility for validating the values of form elements based on CSS classes. Used by FormManager and QuickEdit.

    • Tags:
    • jafl
    • validation
    • form
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Example showing how FormManager uses it.

    Code Sample

    <script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.05.16-20-37'
    }).use('gallery-formmgr-css-validation', function(Y)
    {
    	var e = this.form.elements;
    	for (var i=0; i<e.length; i++)
    	{
    		var e_id     = e[i].id;
    		var msg_list = this.validation_msgs[e_id];
     
    		var info = FormManager.validateFromCSSData(e[i], msg_list);
    		if (info.error)
    		{
    			this.displayMessage(e[i], info.error, 'error');
    			status = false;
    			continue;
    		}
     
    		if (info.keepGoing)
    		{
    			// perform other validations
    		}
    	}
     
    	return status;
    });

    Forum Posts

    Subject Author Date
    Introduction to Form Manager by John Lindal on YUIBlog Eric Miraglia 03/25/10
    override default pre-validation strings Roman Stachura 04/12/10
    Re: override default pre-validation strings Roman Stachura 04/12/10
    Add Canadian Postal Code regEx. Comment only. Huey Brantley 04/13/10
    Re: Add Canadian Postal Code regEx. Comment only. darlenehill19 02/8/11

    © 2006-2011 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info