Chico UI

ch.Custom (Class)

Documentation updated on Fri May 18 2012 12:47:08 GMT-0300 (GMT-03:00), generated by JsDoc Toolkit 2.4.0

Overview

Create custom validation interfaces for Validator validation engine.

Summary

Fields borrowed from class ch.Controls: createFloat,that

Fields borrowed from class ch.Uiobject: DOMParent,originalContent,position,staticContent

Methods borrowed from class ch.Uiobject: content, prevent

Methods borrowed from class ch.Object: callbacks, off, on, once, trigger

Classdetail

Parameters

  • conf: Object, Optional. Object with configuration properties.
  • conf.message: String, Optional. Validation message.
  • conf.points: String, Optional. Sets the points where validation-bubble will be positioned.
  • conf.offset: String, Optional. Sets the offset in pixels that validation-bubble will be displaced from original position determined by points. It's specified by configuration or zero by default: "0 0".
  • conf.context: String, Optional. It's a reference to position the validation-bubble
  • function: Function. Custom function to evaluete a value.

Returns

  • itself

See

Examples

// Validate a even number
$("input").custom(function (value) {
	return (value%2==0) ? true : false;
}, "Enter a even number");