Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
29f85e4
Add GitHub Pages configuration with Jekyll
Copilot Apr 7, 2026
093f7a5
Add Jekyll layouts and update configuration
Copilot Apr 7, 2026
85582b0
Add setup documentation and finalize configuration
Copilot Apr 7, 2026
9e0ae64
Convert XML entries to Markdown format
Copilot Apr 7, 2026
a0ffcfc
Improve XML to Markdown conversion formatting
Copilot Apr 7, 2026
8519817
Add conversion documentation and finalize configuration
Copilot Apr 7, 2026
285f503
Make conversion script paths relative for portability
Copilot Apr 7, 2026
0bfb7b9
Remove old unused files and clean up repository structure
Copilot Apr 15, 2026
fca72e8
Update conversion notes with cleanup details
Copilot Apr 15, 2026
0d6d791
Update to Jekyll 4.x
Copilot Apr 15, 2026
c368205
Add Jekyll 4 upgrade documentation
Copilot Apr 15, 2026
ef930dd
fix yaml error
bytestream Apr 15, 2026
b631414
update .gitignore
bytestream Apr 15, 2026
36ceeb4
update base url
bytestream Apr 15, 2026
8cb9141
update .gitignore
bytestream Apr 15, 2026
1def325
remove copilot generated pages
bytestream Apr 15, 2026
c9d479f
update exclude list
bytestream Apr 15, 2026
76ffa0f
add logo and update colour scheme
bytestream Apr 15, 2026
df11c99
remove useless h1
bytestream Apr 15, 2026
409216a
Fix type annotations in validate.md - replace Any with specific types
Copilot Apr 15, 2026
fad78dc
Fix typos and formatting issues in documentation
Copilot Apr 15, 2026
0eaf33a
Fix validate.md formatting: add line breaks, code blocks, and fix syn…
Copilot Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
- master
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dist
node_modules
config.json
/.jekyll-cache/
/_site/
/Gemfile.lock
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "https://rubygems.org"

gem "jekyll", "~> 4.3"
gem "webrick", "~> 1.8" # Required for Jekyll 4 on Ruby 3.0+

group :jekyll_plugins do
gem "jekyll-feed", "~> 0.17"
end
40 changes: 0 additions & 40 deletions Gruntfile.js

This file was deleted.

80 changes: 56 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,67 @@
jqueryvalidation-content
========================
# jQuery Validation Plugin - Content Repository

## Building
This repository contains the documentation and content for the [jQuery Validation Plugin](https://github.com/jquery-validation/jquery-validation) website.

### Requirements
## GitHub Pages Deployment

* <a href="http://www.xmlsoft.org/">libxml2</a>
* <a href="http://xmlsoft.org/XSLT/">libxslt</a>
This site is automatically deployed to GitHub Pages using Jekyll.

The `xmllint` and `xsltproc` utilities need to be in your path. If you are on Windows, you can get libxml2 and libxslt from <a href="http://www.zlatkovic.com/libxml.en.html">GnuWin32</a>.
### How it Works

* Install [WordPress](http://wordpress.org/download/)
* Install [jqueryvalidation-theme](https://github.com/jzaefferer/validation-theme) - clone that repo, then symlink it into your `wp-content/themes` folder
* Install [gilded-wordpress plugin](https://raw.githubusercontent.com/scottgonzalez/gilded-wordpress/v1.0.0/gilded-wordpress.php)
* Install [jquery-static-index plugin](https://raw.githubusercontent.com/jquery/jquery-wp-content/v4.0.1/plugins/jquery-static-index.php)
- Content is written in Markdown with Jekyll front matter
- The site is built using Jekyll (configured in `_config.yml`)
- GitHub Actions automatically builds and deploys the site when changes are pushed to the `main` or `master` branch
- The workflow is defined in `.github/workflows/deploy-pages.yml`

### Installation
### Local Development

In this repo:
* Make sure nodejs (with npm) is installed, otherwise install from nodejs.org
* `cp config-sample.json config.json`, edit config.json to match login for local WordPress
* run `npm install -g grunt-cli`
* run `npm install`
To test the site locally:

### Hacks
1. Install Ruby 2.7 or higher and Bundler:
```bash
gem install bundler
```

* Make sure your local `wordpress` nodejs module contains [this commit](https://github.com/scottgonzalez/node-wordpress/commit/2b19238cf8064dafb66b9db09d0adcc9eac7f724)
* Make sure your local config contains
* rpc-auth and basic-auth credentials
* a https jqueryvalidation url
2. Install dependencies:
```bash
bundle install
```

### Deploy
3. Run Jekyll locally:
```bash
bundle exec jekyll serve
```

`grunt deploy`
4. Open your browser to `http://localhost:4000/validation-content/`
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local dev URL includes /validation-content/, but _config.yml currently sets baseurl: "". Either update this URL to http://localhost:4000/ (or whatever matches baseurl) or adjust baseurl so the served path matches the docs.

Suggested change
4. Open your browser to `http://localhost:4000/validation-content/`
4. Open your browser to `http://localhost:4000/`

Copilot uses AI. Check for mistakes.

**Note:** This site uses Jekyll 4.x. If you encounter issues, ensure you have Ruby 2.7 or higher installed.

### Making Changes

1. Edit or create Markdown files (`.md`) in the root directory
2. Each file should have Jekyll front matter at the top:
```yaml
---
layout: default
title: Your Page Title
---
```
3. Commit and push your changes
4. GitHub Actions will automatically build and deploy the site

### Content Structure

- `index.md` - Home page
- `documentation.md` - API documentation
- `contribute.md` - Contribution guide
- `reference.md` - General guidelines and reference
- `_entries/` - Markdown documentation entries (for API methods, converted from XML)
- `_layouts/` - Jekyll layout templates

### Deployment

The site is automatically deployed via GitHub Actions when:
- Changes are pushed to `main` or `master` branch
- The workflow can also be triggered manually from the Actions tab

No manual deployment is required!
32 changes: 32 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
title: jQuery Validation Plugin
description: Site content for the jQuery Validation Plugin
url: https://jquery-validation.github.io
baseurl: ""
Comment thread
bytestream marked this conversation as resolved.

# Build settings
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter: rouge

# Exclude from processing
exclude:
- README.md
- LICENSE-MIT.txt
- .gitignore
- .gitattributes
- Gemfile
- Gemfile.lock

# Collections
collections:
entries:
output: true
permalink: /:name/

defaults:
- scope:
path: ""
type: "entries"
values:
layout: "default"
38 changes: 38 additions & 0 deletions _entries/Validator.destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Validator.destroy()
entry_name: Validator.destroy
entry_type: method
category: validator
layout: default
---

# Validator.destroy()

Destroys this instance of validator freeing up resources and unregistering events.

## Description

This is only useful, when you need to clean up after the validator in a Single Page Application.

## Usage


## Examples

Destroying an instance of validator.

```javascript
/*
* On SPA page start.
*/
var validator = $( "#myform" ).validate();

/*
* Just before SPA page's navigation away.
*/
validator.destroy();

/*
* After this point the #myForm form is back to its original boring state.
*/
```
30 changes: 30 additions & 0 deletions _entries/Validator.element.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Validator.element()
entry_name: Validator.element
entry_type: method
category: validator
layout: default
---

# Validator.element()

Validates a single element, returns true if it is valid, false otherwise.

## Description

This behaves as validation on blur or keyup, but returns the result.

## Usage

**element** *(Selector)*

An element to validate, must be inside the validated form.

## Examples

Triggers element validation programmatically.

```javascript
var validator = $( "#myform" ).validate();
validator.element( "#myselect" );
```
27 changes: 27 additions & 0 deletions _entries/Validator.form.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Validator.form()
entry_name: Validator.form
entry_type: method
category: validator
layout: default
---

# Validator.form()

Validates the form, returns true if it is valid, false otherwise.

## Description

This behaves as a normal submit event, but returns the result.

## Usage


## Examples

Triggers form validation programmatically.

```javascript
var validator = $( "#myform" ).validate();
validator.form();
```
33 changes: 33 additions & 0 deletions _entries/Validator.numberOfInvalids.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Validator.numberOfInvalids()
entry_name: Validator.numberOfInvalids
entry_type: method
category: validator
layout: default
---

# Validator.numberOfInvalids()

Returns the number of invalid fields.

## Description

This depends on the internal validator state. It covers all fields only after validating the complete form (on submit or via $("form").valid()). After validating a single element, only that element is counted. Most useful in combination with the invalidHandler-option.

## Usage

**errors** *(Object)*

One or more key/value pairs of input names and messages.

## Examples

Displays a summary of invalid fields after an invalid submit.

```javascript
var validator = $( "#myform" ).validate({
invalidHandler: function() {
$( "#summary" ).text( validator.numberOfInvalids() + " field(s) are invalid" );
}
});
```
27 changes: 27 additions & 0 deletions _entries/Validator.resetForm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Validator.resetForm()
entry_name: Validator.resetForm
entry_type: method
category: validator
layout: default
---

# Validator.resetForm()

Resets the controlled form.

## Description

Resets input fields to their original value (requires form plugin), removes classes indicating invalid elements and hides error messages.

## Usage


## Examples

Reset the form controlled by this validator.

```javascript
var validator = $( "#myform" ).validate();
validator.resetForm();
```
Loading