beetlebug▾
/

ttk::entry validate

Runs the validation script now and gives its result.

PATHNAME validate

Description

Runs -validatecommand with the event forced, in each mode of -validate, also none. A false result runs -invalidcommand. With no -validatecommand, the result is 1.

Returns

1 or 0.

Examples

% ttk::entry .tevd -validatecommand {string is digit %P}
> .tevd insert 0 abc
> .tevd validate
0

% ttk::entry .tevd2
> .tevd2 validate
1

Errors

% ttk::entry .tevd3; .tevd3 validate x
wrong # args: should be ".tevd3 validate"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also