ngx-valid

Interactive Demo & Examples

Modern Angular Validation Library

Explore all validators with live examples and interactive configuration options. Try changing the options to see how each validator behaves in real-time.

Contains Validator

String Validation

Validates that a string contains a specific substring. Supports case-insensitive search and minimum occurrence requirements.

Configuration Options

Equals Validator

String Validation

Validates that a string exactly equals a specific comparison value. Perfect for exact matches and confirmations.

Configuration Options

Password Confirmation Example

This example shows how to use equals validator for password confirmation.

IsAfter Validator

Date Validation

Validates that a date is after a specific comparison date. Supports both Date objects and string date inputs with timezone handling.

Configuration Options

IsBefore Validator

Date Validation

Validates that a date is before a specific comparison date. Perfect for start dates, expiration dates, and date range validation.

Configuration Options

IsCreditCard Validator

Financial Validation

Validates credit card numbers using industry-standard patterns and Luhn algorithm verification. Supports all major card providers with optional provider-specific validation.

Configuration Options

Test Card Numbers

Visa: 4111111111111111

Mastercard: 5555555555554444

Amex: 378282246310005

Discover: 6011111111111117

IsLuhnNumber Validator

Algorithm Validation

Validates numbers using the Luhn algorithm (mod-10 checksum). Commonly used for credit cards, IMEI numbers, and other identification numbers that require checksum validation.

About Luhn Algorithm

The Luhn algorithm is a checksum formula used to validate identification numbers. It works by doubling every second digit from right to left, then summing all digits. If the total is divisible by 10, the number is valid.

Test Numbers

Valid: 79927398713

Valid: 49927398716

Invalid: 79927398714

Invalid: 1234567890123456