# Input Validation 3 - Warning state

> Warning State.

A shadcn/ui block from the [@shadcnblocks](https://shadcnblocks.com) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/shadcnblocks/input-input-validation-3).

- Page, with a live preview: https://shadcn.exchange/r/shadcnblocks/input-input-validation-3
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/shadcnblocks/input-input-validation-3-light-c8294daf1e981b13.png
- Registry item: https://shadcnblocks.com/r/input-input-validation-3.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://shadcnblocks.com/r/input-input-validation-3.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- npm packages: `lucide-react`
- Registry items: `input`, `label`

## Files

### `example/input/input-validation-3.tsx`

```tsx
"use client";

import { AlertTriangle } from "lucide-react";

import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

export const title = "Warning State";

const Example = () => (
  <div className="w-full max-w-sm space-y-2">
    <Label htmlFor="password-warning">Password</Label>
    <Input
      className="border-orange-600 bg-background focus-visible:border-orange-600 focus-visible:ring-orange-600/50"
      defaultValue="weak123"
      id="password-warning"
      placeholder="Enter password"
      type="password"
    />
    <div className="flex items-center gap-2 text-sm text-orange-600 dark:text-orange-400">
      <AlertTriangle className="h-4 w-4" />
      <span>Password is weak. Consider using a stronger password</span>
    </div>
  </div>
);

export default Example;
```
