Skip to content

Results for “validation”

15 prompts

Write a system prompt and code in [language] that makes an LLM extract [fields] from [input type] as valid JSON matching this schema: [schema]. Include validation, a retry if parsing fails, and handling for missing data.

ChatGPT
Coding & Development

Prompt for structured JSON output from an LLM

Reliably gets valid JSON from an AI model in your app.

0

Here's my regex: [regex] meant to match [description]. Generate 15 test strings that should match and 15 that shouldn't, including edge cases. Tell me which ones my regex gets wrong and suggest a fixed version.

ChatGPT
Coding & Development

Regex test cases

Tests a regular expression against tricky inputs.

0

Build validation for a [form type] form in [framework or vanilla JS]. Validate [fields] on blur and submit, show inline accessible error messages, disable submit while sending, and handle server-side errors gracefully.

ChatGPT
Coding & Development

Form validation on the frontend

Accessible form validation with helpful error messages.

0

Build a file upload feature in [stack]. Show a progress bar, validate file type and size on client and server, store files in [storage], generate safe file names, and return a URL. Explain security considerations.

ChatGPT
Coding & Development

File upload with progress

Secure file uploads with progress bars and validation.

0

Write a Python class for [purpose, e.g. a shopping cart]. Include type hints, docstrings, validation, a clean public API, and pytest unit tests covering normal use and edge cases.

ChatGPT
Coding & Development

Write a Python class with tests

A well-designed Python class with type hints and unit tests.

0

Write a FastAPI endpoint for [operation, e.g. creating an order]. Use Pydantic models for request and response, validate [fields], return proper status codes, handle errors, and include an example request with curl and a pytest test.

ChatGPT
Coding & Development

Python FastAPI endpoint

A typed FastAPI endpoint with validation and error handling.

0

Act as a senior Next.js developer. Next.js version and router: [e.g. 15, App Router] Page: [purpose] Data source: [API/database] Styling: [Tailwind / CSS modules] Write the page using server components where appropriate, a client component for interactivity, loading and error UI, metadata for SEO, caching/revalidation…

ChatGPT
Coding & Development

Next.js page with data fetching

Build a Next.js page or route with data fetching, loading and error states and SEO metadata.

0

Act as a senior Laravel developer. Laravel version: [version] Resource: [name and fields with types/rules] Relationships: [details] UI: [Blade / Inertia / API only] Generate: migration, model with fillable and casts, form request validation, resource controller, routes, policy for authorisation, views or API resources…

ChatGPT
Coding & Development

Laravel CRUD feature

Generate a complete Laravel CRUD feature: migration, model, controller, routes, validation and views.

0

Act as a senior Django developer. Django version: [version] Feature: [description] Models and fields: [details] Users and permissions: [details] Generate: models with Meta options and __str__, admin with list_display/filters/search, forms with validation, class-based views, URLs, templates outline, and tests. Explain…

ChatGPT
Coding & Development

Django model, admin and views

Create Django models, admin configuration, forms and views for a new feature.

0

Generate TypeScript types from this JSON. JSON sample(s): ```json [paste] ``` Create interfaces with sensible names, mark optional and nullable fields, use union types for known string values, and also create a Zod schema for runtime validation. Note any fields where the sample is ambiguous.

ChatGPT
Coding & Development

TypeScript types from JSON

Generate accurate TypeScript interfaces and validation schemas from sample JSON.

0

Act as a QA-minded backend engineer. Framework and test tool: [e.g. Jest + Supertest, pytest + httpx, PHPUnit] Endpoints: [list with expected behaviour] Auth: [method] Database setup: [test DB, fixtures] Write integration tests covering success cases, validation errors, auth failures and not-found cases, with setup/te…

ChatGPT
Coding & Development

Integration tests for an API

Test your API endpoints end to end, including the database, auth and error responses.

0

Act as a senior mobile developer. Framework: [React Native with Expo / Flutter] Screen: [e.g. login, product list, profile, settings] Features: [list] Data: [static / API endpoint] Design style: [minimal, iOS-like, Material] Write the screen with: - Clean component structure - Loading, error and empty states - Form va…

ChatGPT
Coding & Development

Mobile app screen in React Native or Flutter

Generate a polished mobile screen with navigation, state and platform-friendly UI.

0