{"id":21353420,"url":"https://github.com/feathersui/feathersui-validators","last_synced_at":"2026-02-02T04:05:55.686Z","repository":{"id":145394395,"uuid":"525089618","full_name":"feathersui/feathersui-validators","owner":"feathersui","description":"A port of the form validation classes from Apache Flex (formerly Adobe Flex) to Feathers UI for Haxe and OpenFL","archived":false,"fork":false,"pushed_at":"2026-01-13T19:56:30.000Z","size":289,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-13T21:44:58.031Z","etag":null,"topics":["adobe-flex","apache-flex","feathers-ui","form-validation","form-validator","haxe","openfl"],"latest_commit_sha":null,"homepage":"https://api.feathersui.com/validators/","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feathersui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-15T18:07:48.000Z","updated_at":"2026-01-13T19:56:34.000Z","dependencies_parsed_at":"2023-11-16T22:54:50.812Z","dependency_job_id":"bd2a4c3f-bc48-4b44-9446-8ad063514a34","html_url":"https://github.com/feathersui/feathersui-validators","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/feathersui/feathersui-validators","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Ffeathersui-validators","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Ffeathersui-validators/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Ffeathersui-validators/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Ffeathersui-validators/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feathersui","download_url":"https://codeload.github.com/feathersui/feathersui-validators/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feathersui%2Ffeathersui-validators/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29004695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T01:32:03.847Z","status":"online","status_checked_at":"2026-02-02T02:00:07.448Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe-flex","apache-flex","feathers-ui","form-validation","form-validator","haxe","openfl"],"created_at":"2024-11-22T03:17:33.417Z","updated_at":"2026-02-02T04:05:55.660Z","avatar_url":"https://github.com/feathersui.png","language":"Haxe","readme":"# Validators for Feathers UI\n\nA port of the form validation classes from [Apache Flex](https://flex.apache.org/) (formerly Adobe Flex) to [Feathers UI](https://feathersui.com/) for [Haxe](https://haxe.org/) and [OpenFL](https://openfl.org/).\n\nIncludes the following validators:\n\n- [`CreditCardValidator`](https://api.feathersui.com/validators/current/feathers/validators/CreditCardValidator.html)\n- [`CurrencyValidator`](https://api.feathersui.com/validators/current/feathers/validators/CurrencyValidator.html)\n- [`DateValidator`](https://api.feathersui.com/validators/current/feathers/validators/DateValidator.html)\n- [`EmailValidator`](https://api.feathersui.com/validators/current/feathers/validators/EmailValidator.html)\n- [`NumberValidator`](https://api.feathersui.com/validators/current/feathers/validators/NumberValidator.html)\n- [`PhoneNumberValidator`](https://api.feathersui.com/validators/current/feathers/validators/PhoneNumberValidator.html)\n- [`RegExpValidator`](https://api.feathersui.com/validators/current/feathers/validators/RegExpValidator.html)\n- [`SocialSecurityValidator`](https://api.feathersui.com/validators/current/feathers/validators/SocialSecurityValidator.html)\n- [`StringValidator`](https://api.feathersui.com/validators/current/feathers/validators/StringValidator.html)\n- [`ZipCodeValidator`](https://api.feathersui.com/validators/current/feathers/validators/ZipCodeValidator.html)\n\n## Minimum Requirements\n\n- Haxe 4.0\n- OpenFL 8.9.7\n\n## Installation\n\nRun the following command in a terminal to install [feathersui-validators](https://lib.haxe.org/p/feathersui-validators) from Haxelib.\n\n```sh\nhaxelib install feathersui-validators\n```\n\n## Project Configuration\n\nAfter installing the library above, add it to your OpenFL _project.xml_ file:\n\n```xml\n\u003chaxelib name=\"feathersui-validators\" /\u003e\n```\n\n## Usage\n\nThe following example validates a text input when it loses focus:\n\n```haxe\nvar textInput = new TextInput();\naddChild(textInput);\n\nvar validator = new NumberValidator();\nvalidator.source = textInput;\nvalidator.valueFunction = () -\u003e textInput.text;\nvalidator.triggerEvent = FocusEvent.FOCUS_OUT;\nvalidator.addEventListener(ValidationResultEvent.VALID, event -\u003e {\n\ttextInput.errorString = null;\n});\nvalidator.addEventListener(ValidationResultEvent.INVALID, event -\u003e {\n\tvar errorString = \"\";\n\tfor (validationResult in event.results) {\n\t\tif (!validationResult.isError) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (errorString.length \u003e 0) {\n\t\t\terrorString += \"\\n\";\n\t\t}\n\t\terrorString += validationResult.errorMessage;\n\t}\n\ttextInput.errorString = errorString;\n});\n```\n\nThe following example validates a form when it is submitted:\n\n```haxe\nvar form = new Form();\naddChild(form);\n\nvar textInput = new TextInput();\nvar formItem = new FormItem(\"My Field\", textInput);\nform.addChild(formItem);\n\nvar submitButton = new Button(\"Submit\");\nform.addChild(submitButton);\nform.submitButton = submitButton;\n\nvar validator = new NumberValidator();\nvalidator.source = null;\nvalidator.valueFunction = () -\u003e textInput.text;\n// don't trigger automatically\n// we'll do it manually when the form is submitted\nvalidator.triggerEvent = null;\nvalidator.addEventListener(ValidationResultEvent.VALID, event -\u003e {\n\ttextInput.errorString = null;\n});\nvalidator.addEventListener(ValidationResultEvent.INVALID, event -\u003e {\n\tvar errorString = \"\";\n\tfor (validationResult in event.results) {\n\t\tif (!validationResult.isError) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (errorString.length \u003e 0) {\n\t\t\terrorString += \"\\n\";\n\t\t}\n\t\terrorString += validationResult.errorMessage;\n\t}\n\ttextInput.errorString = errorString;\n});\n\nform.addEventListener(FormEvent.SUBMIT, event -\u003e {\n\tvar hasErrors = false;\n\tvar validators:Array\u003cIValidator\u003e = [validator];\n\tvar events = Validator.validateAll(validators);\n\tfor (event in events) {\n\t\tfor (validationResult in event.results) {\n\t\t\tif (validationResult.isError) {\n\t\t\t\thasErrors = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (hasErrors) {\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (hasErrors) {\n\t\t// some checks were invalid, so don't submit\n\t\treturn;\n\t}\n\n\t// everything is valid, so now it can be sent to the server\n\t// using URLLoader or something\n});\n```\n\n## Documentation\n\n- [feathersui-validators API Reference](https://api.feathersui.com/validators/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeathersui%2Ffeathersui-validators","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeathersui%2Ffeathersui-validators","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeathersui%2Ffeathersui-validators/lists"}