From a39188d574f9f5b6e7e851de3902b6383c83fdc0 Mon Sep 17 00:00:00 2001 From: gamahachaa Date: Tue, 4 Jun 2024 18:52:32 +0200 Subject: [PATCH] Update Validator.hx Adding Date for required validator on dropdown of type date. --- haxe/ui/validators/Validator.hx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/haxe/ui/validators/Validator.hx b/haxe/ui/validators/Validator.hx index c6c06ca82..8da1c65ba 100644 --- a/haxe/ui/validators/Validator.hx +++ b/haxe/ui/validators/Validator.hx @@ -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); } @@ -87,4 +93,4 @@ class Validator implements IValidator { invalidMessage = value; } } -} \ No newline at end of file +}