Skip to content

Commit

Permalink
improve edit validator
Browse files Browse the repository at this point in the history
  • Loading branch information
xianjimli committed Dec 12, 2023
1 parent 41aa7dc commit c6844fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/widgets/edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,7 @@ bool_t edit_is_valid_value(widget_t* widget) {
if (edit->validator != NULL) {
value_t v;
tk_object_t* obj = object_widget_create(widget);
tk_object_set_prop_pointer(obj, STR_PROP_SELF, widget);
if (fscript_eval(obj, edit->validator, &v) == RET_OK) {
TK_OBJECT_UNREF(obj);
return value_bool(&v);
Expand Down

0 comments on commit c6844fa

Please sign in to comment.