A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/form/api/colorpicker/colorpicker_validate_method/ below:

Website Navigation


JavaScript Form - validate Colorpicker Method

validate()

validates a ColorPicker control

validate(silent?: boolean, validateValue?: string): boolean;

Parameters: Returns:

true - if a control is valid; otherwise, false.

Example

// the method validates the specified value
form.getItem("colorpicker").validate(true, "#92E7DC"); // -> true/false

// the method validates the current value
form.getItem("colorpicker").validate(true); // -> true/false

When calling without parameters or setting the silent parameter to false, the method invokes the BeforeValidate and AfterValidate events and visually modifies the control.

// the method validates the specified value
form.getItem("colorpicker").validate(false, "#92E7DC"); // -> true/false

// the method validates the current value
form.getItem("colorpicker").validate(); // -> true/false
Change log:

The silent and validateValue parameters are added in v7.0


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4