form-validation

form-validation is a skill for Claude Code, Codex from AXIOTN/frontend-page-generator. It costs 0 tokens per session (696 once invoked), scanned A, a copy of balance-check, MIT.

A form-validation toolkit: form validation checks whether entered values meet rules before they are accepted or sent. It includes checks for required fields, email, phone numbers, text length, patterns, matching fields, and numeric ranges.

In plain words
What is it for?
Use it to validate forms such as sign-ups, contact forms, and password confirmation fields.
Why use it?
It removes repeated code for checking user input and producing validation errors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to validate forms such as sign-ups, contact forms, and password confirmation fields.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/axiotn/frontend-page-generator/form-validation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AXIOTN/frontend-page-generator --skill form-validation
Clone the repo
git clone --depth 1 https://github.com/AXIOTN/frontend-page-generator

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for form-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/axiotn/frontend-page-generator/form-validation.svg)](https://agentmods.dev/skills/axiotn/frontend-page-generator/form-validation)
Your own site
<a href="https://agentmods.dev/skills/axiotn/frontend-page-generator/form-validation"><img src="https://agentmods.dev/badge/skills/axiotn/frontend-page-generator/form-validation.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 696 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00696
Opus 5 $0.00000 $0.00348
Sonnet 5 $0.00000 $0.00139
Haiku 4.5 $0.00000 $0.00070

Measured 7d ago against content hash a85ed80a8531, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

form-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to balance-check — 177 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

frontend-page-generator/sub-skills/form-validation/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

表单验证子技能

概述

提供完整的表单验证解决方案,包括常用验证规则和验证器类。

验证规则

export const validators = {
  required: (message = '此字段为必填项') => (value) => {
    if (value === undefined || value === null || value === '') return message;
    return null;
  },

  email: (message = '请输入有效的邮箱地址') => (value) => {
    if (!value) return null;
    return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value) ? null : message;
  },

  phone: (message = '请输入有效的手机号') => (value) => {
    if (!value) return null;
    return /^1[3-9]\d{9}$/.test(value) ? null : message;
  },

  minLength: (min, message) => (value) => {
    if (!value) return null;
    return value.length >= min ? null : message || `至少需要${min}个字符`;
  },

  maxLength: (max, message) => (value) => {
    if (!value) return null;
    return value.length <= max ? null : message || `最多${max}个字符`;
  },

  pattern: (regex, message = '格式不正确') => (value) => {
    if (!value) return null;
    return regex.test(value) ? null : message;
  },

  match: (field, message = '两次输入不一致') => (value, formData) => {
    return value === formData[field] ? null : message;
  },

  range: (min, max, message) => (value) => {
    if (value === undefined || value === null) return null;
    const num = Number(value);
    return num >= min && num <= max ? null : message || `请输入${min}-${max}之间的数值`;
  },

  custom: (validatorFn, message) => (value, formData) => {
    return validatorFn(value, formData) ? null : message;
  }
};

表单验证器类

export class FormValidator {
  constructor(rules = {}) {
    this.rules = rules;
  }

  validate(formData) {
    const errors = {};
    let isValid = true;

    for (const [field, fieldRules] of Object.entries(this.rules)) {
      for (const rule of fieldRules) {
        const error = rule(formData[field], formData);
        if (error) {
          errors[field] = error;
          isValid = false;
          break;
        }
      }
    }

    return { isValid, errors };
  }
}

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 100 lines · 0 tokens per session scan A a85ed80a8531

Subscribe to this mod's changes

form-validation is a skill published in the GitHub repository AXIOTN/frontend-page-generator (12 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 696 tokens. A static security scan graded it A with 0 findings. It is 100% identical to balance-check, differing in 177 lines, and is treated as a copy.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

create-site

Creates a new Power Pages code site (SPA) using React, Angular, Vue, or Astro. Guides through the full process from initial concept to deployed site: requirements discovery, scaffolding, component planning, design, implementation, validation, and deployment. Use when the user wants to create, build, or scaffold a new…

microsoft/power-platform-skills · 73 tokens

prototype-web

A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.

nexu-io/html-anything · 24 tokens

menu-transitions-rtl

Animate react-horizontal-scrolling-menu scrolling and build right-to-left menus: noPolyfill defaults to true since v8, so transitionDuration (default 500), a custom-easing-function transitionBehavior, and per-call ScrollOptions { duration, boundary } on scrollToItem/scrollNext/scrollPrev are silently ignored unless…

asmyshlyaev177/react-horizontal-scrolling-menu · 137 tokens

vite

Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.

antfu/skills · 49 tokens