{"id":19041974,"url":"https://github.com/writetome51/validating-inputs","last_synced_at":"2025-02-21T22:44:28.852Z","repository":{"id":57169568,"uuid":"222199852","full_name":"writetome51/validating-inputs","owner":"writetome51","description":"A package of TypeScript/JavaScript modules that help you create form inputs that validate themselves","archived":false,"fork":false,"pushed_at":"2021-05-15T02:15:22.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T22:02:23.629Z","etag":null,"topics":["form","inputs","javascript","typescript","validation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/writetome51.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-17T05:04:50.000Z","updated_at":"2021-05-15T02:15:24.000Z","dependencies_parsed_at":"2022-09-11T02:30:15.131Z","dependency_job_id":null,"html_url":"https://github.com/writetome51/validating-inputs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fvalidating-inputs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fvalidating-inputs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fvalidating-inputs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fvalidating-inputs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/validating-inputs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100512,"owners_count":19747683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["form","inputs","javascript","typescript","validation"],"created_at":"2024-11-08T22:33:38.291Z","updated_at":"2025-02-21T22:44:28.831Z","avatar_url":"https://github.com/writetome51.png","language":"TypeScript","readme":"# interface CanBeValidated\n\n\tisValid: (() =\u003e boolean) | (() =\u003e boolean)[];\n\t\t// Can be function or array of functions.\n\n\n# interface ValidatingInput extends CanBeValidated\n\n    __type: 'text' | 'password' | 'number'; // Private\n\n    id: string;\n        // assigned to \u003cinput\u003e id. Same value is used for 'name' attribute and  \n        // the input's associated \u003clabel\u003e 'for' attribute.\n\n\terrorMessage: string | string[];\n        // message to show if input is invalid.\n        // If this.isValid is array of functions, this must be array of strings, \n        // each one belonging with function of same index.\n\n\ttriggeredError: string;\n        // If input is invalid, this is assigned the resulting message in \n        // this.errorMessage.\n\n\tobjectToBind: object;\n        // this.objectToBind[this.propertyToBind] stores entered value of this input\n\n\tpropertyToBind: string; // property in this.objectToBind\n\n\tlabel: string; // same value is used for 'placeholder' attribute\n\n\thideLabel?: boolean; \n        // Adds 'hidden' attribute to input's associated \u003clabel\u003e, default true\n\n\thidePlaceholder?: boolean; // default false\n\n\trequired?: boolean; // default true\n\n\tprompt?: string; // text explaining input or asking user to fill it in\n\n\tobjectToMatch?: object;\n        // this.objectToMatch[this.propertyToMatch] stores the entered value of another\n        // input -- an input whose value is supposed to match with this one.\n        // Example: if one \u003cinput\u003e is for 'password' and another \u003cinput\u003e is for \n        // 'confirm-password', they must match.  The ValidatingInput representing \n        // 'confirm-password' would need its objectToMatch[propertyToMatch] to be the \n        // object[property] storing the value of 'password'. \n        // this.objectToMatch[this.propertyToMatch] can then be checked in this.isValid \n        // if it matches this.objectToBind[this.propertyToBind].\n\n\tpropertyToMatch?: string; // property in this.objectToMatch\n\n\tmax?: number; // max value allowed if this.type is 'number'\n\n\tmin?: number; // min value allowed if this.__type is 'number'\n\n\tmaxLength?: number; // if this.__type is 'text' or 'password'\n\n\tminLength?: number; // if this.__type is 'text' or 'password'\n\t\n\n\n# ValidatingInputService\n\nAbstract class representing a single `ValidatingInput`.\n\n# ValidatingInputsService\n\nAbstract class representing a `ValidatingInput` array.\n\n# ValidatingNumberInputService\n\nAbstract class, implements `ValidatingInputService`\n\n# ValidatingPasswordInputService\n\nAbstract class, implements `ValidatingInputService`\n\n# ValidatingTextInputService\n\nAbstract class, implements `ValidatingInputService`\n\n# InputValidatorService\n\nValidates a `ValidatingInput`. If `ValidatingInput.isValid` is array of functions,  \nthey are called in the order listed.\n\n# ValidatingFormInputComponent\n\nAbstract UI component class, representing a `ValidatingInput` in UI.\n\n# ValidatingFormInputsComponent\n\nAbstract UI component class, representing a `ValidatingInput` array in UI.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fvalidating-inputs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Fvalidating-inputs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fvalidating-inputs/lists"}