Validation Requirements

This document outlines validation requirements for the PokeDB editor system. Each entity type has specific rules for creating, updating, and deleting entries. All operations require authentication and editor role. Update/delete operations require data verification. All change requests follow a two-tier validation process:

  1. Format Validation - Basic type and format validation
  2. Content Validation - Business logic, data constraints, and content validation

Abilities

Damage Categories

Leveling Rates

Natures

Pokemon

Image Content Guidelines

All images uploaded through the editor system undergo automated content moderation to ensure appropriateness. Images must be relevant to Pokemon content and meet the following guidelines:

Appropriate Content

Official Pokemon artwork and sprites
Game screenshots and official media
Icons and symbols related to Pokemon mechanics
High-quality fan art that's family-friendly
Educational diagrams and charts

Inappropriate Content

Adult, suggestive, or explicit content
Violence or disturbing imagery
Copyrighted material without permission
Low-quality, blurry, or heavily compressed images
Images unrelated to Pokemon or the specific context

Technical Requirements

Damage Category Icons: Must be exactly 40x29 pixels
Nature Icons: Must have square aspect ratio when provided
Pokemon Images: Normal and shiny variants required for main images

Automated Moderation: All uploaded images are automatically scanned for inappropriate content. Images that fail moderation will be rejected with a clear error message. If you believe an image was incorrectly flagged, please contact the moderation team through the support channels.

Common Validation Rules

All Operations

Authentication & editor role required
Format and type validation
Reference validation (IDs must exist)

Update/Delete Operations

Data verification required
Change detection (no unchanged updates)
Dependency checking for deletions

Image Requirements

Content must be appropriate
Square aspect ratio when required
Specific dimensions when specified

Text Content Rules

Flavor texts must be unique per version
Version references must be valid
Height/weight must follow correct format

URL-Friendly Identifiers

All identifiers (or name fields for entities without identifiers) must be URL-friendly to ensure proper routing and URL generation. This validation applies to both CREATE and UPDATE operations.

URL-Friendly Format Rules:

  • Only lowercase letters (a-z), numbers (0-9), and hyphens (-) are allowed
  • Must start and end with alphanumeric characters
  • No consecutive hyphens (--) allowed
  • No spaces, underscores, or special characters

Examples:

Valid:

pikachu
mr-mime
type-null
tapu-koko
porygon2

Invalid:

Pikachu (uppercase)
mr_mime (underscore)
type--null (double hyphen)
-tapu-koko (starts with hyphen)
porygon 2 (space)

Applies to:

  • Abilities: identifier field
  • Damage Categories: identifier field
  • Natures: identifier field
  • Pokemon: identifier field (both National Pokedex and Forms)

Error Handling

The validation system provides detailed error messages including the specific field that failed, expected format, current invalid value, and suggested corrections.