Skip to content

Commit

Permalink
Update Validator.hx
Browse files Browse the repository at this point in the history
Adding Date for required validator on dropdown of type date.
  • Loading branch information
gamahachaa authored Jun 4, 2024
1 parent f61da3c commit a39188d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion haxe/ui/validators/Validator.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ class Validator implements IValidator {
valid = validateString(null);
case TObject:
valid = validateString(component.text);
case TClass(Date):
var stringValue:String = null;
if (component.value != null) {
stringValue = Std.string(component.value);
}
valid = validateString(stringValue);
case _:
trace("unsupported", Type.typeof(component.value), component.id, component.className, component.value);
}
Expand Down Expand Up @@ -87,4 +93,4 @@ class Validator implements IValidator {
invalidMessage = value;
}
}
}
}

0 comments on commit a39188d

Please sign in to comment.