{"id":21361679,"url":"https://github.com/webpractik/double-validate","last_synced_at":"2026-03-11T04:04:03.101Z","repository":{"id":57215596,"uuid":"48027668","full_name":"webpractik/double-validate","owner":"webpractik","description":"Плагин для двойной валидации (client+server). Содержит в себе унифицированный ajax+json запрос и умеет автоматически подставлять ошибки к конкретным полям.","archived":false,"fork":false,"pushed_at":"2018-12-02T22:14:59.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-27T02:07:00.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webpractik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-15T07:46:58.000Z","updated_at":"2020-09-14T09:57:59.000Z","dependencies_parsed_at":"2022-08-26T13:31:37.319Z","dependency_job_id":null,"html_url":"https://github.com/webpractik/double-validate","commit_stats":null,"previous_names":["north-leshiy/double-validate"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/webpractik/double-validate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fdouble-validate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fdouble-validate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fdouble-validate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fdouble-validate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpractik","download_url":"https://codeload.github.com/webpractik/double-validate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpractik%2Fdouble-validate/sbom","scorecard":{"id":694488,"data":{"date":"2025-08-11","repo":{"name":"github.com/webpractik/double-validate","commit":"b3c8731b889d37b126fd0b4fccdd7c9513d372e1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T03:15:31.883Z","repository_id":57215596,"created_at":"2025-08-22T03:15:31.883Z","updated_at":"2025-08-22T03:15:31.883Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30370297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"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":[],"created_at":"2024-11-22T06:10:54.850Z","updated_at":"2026-03-11T04:04:03.086Z","avatar_url":"https://github.com/webpractik.png","language":"JavaScript","readme":"# Jquery Double Validate\nПлагин для двойной валидации (client+server). Содержит в себе унифицированный ajax+json запрос и умеет автоматически подставлять ошибки к конкретным полям.\n\n## Установка:\n\n```\nnpm install double-validate\nbower install double-validate\n```\n\n## Parameters\n\nName | Desc | Default\n------------ | ------------- | -------------\n**params** | Параметры транслируемые в JqueryFormValidator. Перекрывает параметры по умолчанию. | `{scrollToTopOnError: false, borderColorOnError: false, errorMessageClass: 'error', lang: 'ru', }`\n**urlHandler** | Адрес обработчика данной формы. |  Берет текущий `action` из формы.\n**showErrorMessage** | Показывать ли alert при неуспешной попытке послать данные на сервер | true\n**errorMessage** | Текст для alert при неуспешной попытке послать данные на сервер (к примеру 5хх ответ сервера, отсутствие интернета). | \"Спасибо за отправку формы! Однако что-то пошло не так и мы не смогли получить данные. Перезвоните нам или попробуйте отправить еще раз \"позже.\"\n**reportErrorToListener** | Посылать ли данные об ошибки внешнему фиксатору. Нужно для личных нужд мониторинга работы форм. | false\n**urlErrorListener** | Посылать ли данные об ошибки внешнему фиксатору. Нужно для личных нужд мониторинга работы форм. | null\n**classMainErrorContainer** | Класс контейнера куда будут складываться общие ошибки | 'double-validate__main-error-container'\n**classMainErrorItem** | Класс элемента в который будет обернут элемент общей ошибки | 'double-validate__main-error-item'\n\n## Callbacks\nName | Desc\n------------ | -------------\n**onServerValidateSuccess** | Вызывается после успешной отправки данных на сервер и получении status=true. Принимает в параметр reponse json ответ сервера.\n**onServerValidateError** | Вызывается после успешной отправки данных на сервер и получении status=false. Принимает в параметр reponse json ответ сервера.\n**onBlockedForm** | Вызывается при блокировке формы перед отправкой данных на сервер. Принимает в параметр Jquery выборку текущей формы.\n**onUnBlockedForm** | Вызывается после разблокировки формы. Принимает в параметр Jquery выборку текущей формы.\n**onErrorRequest** | Вызывается при ошибке отправки формы. Принимает параметры запроса.\n\n\n## Детали\n* При отправке данных включает блокировку, не позволяя задублировать запрос до получения ответа. В этот момент на форму навешивается класс `.double-validate--wait`, для возможности дать визуальный фидбек юзверю.\n* При ошибке отправки запроса, или не получении в ответет корректного json, выведет примитивный alert с сообщением, которое можно заменить через параметр errorText\n* Учитывает файлы при отправке формы\n* Есть общие ошибки которые нет возможности логически привязать к какому либо полю, они передаются через отдельное свойство объекта ответа сервера. Они размещаются в отдельном контейнере, классами которые можно управлять через свойства.\n* Есть возможность послать на внешний сервер при ошибке отправки формы для внутренней системы алертов\n\n## Example\n```html\n\u003cform id=\"form\" action=\"/ajax/formHandler.php\"\u003e\n\t\u003cdiv class=\"double-validate__main-error-container\"\u003e\u003c/div\u003e\n\t\u003cinput type=\"email\" value=\"\" placeholder=\"Email\" required\n\t\tdata-validation-error-msg-required=\"Поле, обязательно к заполнению\"\n\t\tdata-validation=\"required\"\u003e\n\n\t\u003cinput type=\"text\" value=\"\" placeholder=\"Телефон\" required\n\t\tdata-validation-error-msg-required=\"Поле, обязательно к заполнению\"\n\t\tdata-validation=\"required\"\u003e\n\u003c/form\u003e\n\n\u003cscript src=\"bower_components/jquery/dist/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/jquery-form-validator/form-validator/jquery.form-validator.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/double-validate/jquery.double-validate.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\t$('#form').doubleValidate({\n\t\tonServerValidateSuccess: function(response){\n\t\t\tconsole.log('you request added');\n\t\t},\n\t\tonServerValidateError: function(response){\n\t\t\tconsole.log('error');\n\t\t}\n\t});\n\u003c/script\u003e\n```\n\n## Унифицированный ответ сервера:\n```json\n{\n\t  \"status\": true\n\t, \"mainErrors\": [\n\t\t\"Вы уже отправили заявку\"\n\t]\n\t, \"errors\": {\n\t\t  \"email\": \"Пользователь с таким email уже существует\"\n\t\t, \"company\": \"Для регистрации в качестве оптового покупателя необходимо заполнить это поле\"\n\t\t[...]\n\t}\n}\n```\nРаботает на основе [jQuery Form Validator](https://github.com/victorjonsson/jQuery-Form-Validator).\nВыбран он вместо стандартного jquery.validate.js из-за большей гибкости управления из html, что проще в поддержке на ряде движков.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpractik%2Fdouble-validate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpractik%2Fdouble-validate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpractik%2Fdouble-validate/lists"}