# Validity > Validation for Kotlin, written in plain Kotlin. - [Validity](https://validity-kt.dev/index.md): Validation for Kotlin, written in plain Kotlin. - [Why Validity](https://validity-kt.dev/introduction.md): What Validity is, the problem it solves, and the ideas the rest of these docs build on. - [Installation](https://validity-kt.dev/installation.md): Add Validity to a Gradle or Maven project. - [Modules](https://validity-kt.dev/reference/modules.md): What validity-core and validity-phone hold, what they depend on, and how their versions move together. - [Quick start](https://validity-kt.dev/quickstart.md): Declare the rules of a class, validate it and read every broken rule, in five minutes. - [Rules in the class](https://validity-kt.dev/guides/rules-in-the-class.md): Validatable: a class that declares its own rules, and the four ways to check them. - [Rules beside the class](https://validity-kt.dev/guides/rules-beside-the-class.md): validation { } writes the rules of a type outside it, for a class that is not yours or rules that live elsewhere. - [Null values](https://validity-kt.dev/guides/null-values.md): required, ifPresent and forbidden decide what null means for a property, once, before its constraints. - [Nested objects](https://validity-kt.dev/guides/nested-objects.md): valid() checks the rules of a property's own type, and nests their paths under the property. - [Collections and maps](https://validity-kt.dev/guides/collections-and-maps.md): each, eachKey and eachValue run rules on every element, key or value, with the index or the key in the path. - [Rules across fields](https://validity-kt.dev/guides/rules-across-fields.md): Presence rules such as exactlyOneOf and allOrNoneOf, and constraint { } for any rule about the whole object. - [Custom constraints](https://validity-kt.dev/guides/custom-constraints.md): constraint { } for a rule of your own, and a reusable constraint that looks exactly like a built-in one. - [Combining constraints](https://validity-kt.dev/guides/combining-constraints.md): The or, and, not combinators build one rule out of several constraints, with a message that explains the combination. - [Fail fast](https://validity-kt.dev/guides/fail-fast.md): failFast { } runs its rules in order and stops at the first that fails, for a rule that only makes sense after another. - [Converting values](https://validity-kt.dev/guides/converting-values.md): convert and the convertTo shortcuts check text that carries a number, a date or an enum, then validate the converted value. - [Context](https://validity-kt.dev/guides/context.md): ContextualValidatable hands the rules data the caller passes, such as the logged-in customer, typed by the compiler. - [Coroutines](https://validity-kt.dev/guides/coroutines.md): Every lambda you hand to Validity can call suspend functions, under the same names, and validate() suspends while they run. - [Results and violations](https://validity-kt.dev/guides/results.md): ValidationResult holds every broken rule, and each Violation has a path, a message, a code and metadata. - [Exceptions](https://validity-kt.dev/guides/exceptions.md): validateOrThrow throws a ValidationException with every violation, so one handler can answer every invalid request. - [Metadata](https://validity-kt.dev/guides/metadata.md): metadata { } attaches your own entries to every violation of a block, such as an id, a row number or a severity. - [Configuration](https://validity-kt.dev/guides/configuration.md): Validity.configure sets the messages and the clock once, at startup, and Validity { } varies them for one call. - [Messages](https://validity-kt.dev/guides/messages.md): Change the default message of any constraint, for the whole application or one call, with placeholders filled in. - [Time](https://validity-kt.dev/guides/time.md): Rules about now and today read the clock of the configuration, so tests and users in other zones get the right answer. - [AI agents](https://validity-kt.dev/ai-agents.md): Connect Claude, Cursor, VS Code or any agent to these docs: an MCP server, a skill, llms.txt and every page as Markdown. - [Constraints](https://validity-kt.dev/constraints/overview.md): Every constraint, by the type of value it checks, and the conventions they all follow. - [Any value](https://validity-kt.dev/constraints/any.md): Constraints that work on a value of any type: equality, membership, and the combinators that join other constraints. - [Booleans](https://validity-kt.dev/constraints/booleans.md): isTrue and isFalse, for consents, confirmations and flags. - [Strings](https://validity-kt.dev/constraints/strings.md): Length, content, characters and text formats of a String. - [Numbers](https://validity-kt.dev/constraints/numbers.md): Range, sign, multiples, digits and decimal places of every number type, unsigned included. - [Collections](https://validity-kt.dev/constraints/collections.md): Size, content and duplicates of lists, sets and arrays. - [Maps](https://validity-kt.dev/constraints/maps.md): Size, keys and values of a Map. - [Dates and times](https://validity-kt.dev/constraints/dates-and-times.md): Past, future and comparisons for LocalDate, Instant, ZonedDateTime, YearMonth, java.util.Date and the other java.time types. - [Calendar](https://validity-kt.dev/constraints/calendar.md): Age, today, weekdays and windows of time around now. - [Durations](https://validity-kt.dev/constraints/durations.md): Range constraints for kotlin.time.Duration and java.time.Duration. - [Internet](https://validity-kt.dev/constraints/internet.md): Emails, URLs, hosts, IP addresses, ports, slugs, JWTs and MIME types. - [Identifiers](https://validity-kt.dev/constraints/identifiers.md): UUIDs, ULIDs, ObjectIds, semantic versions, ISBNs, barcodes, IMEIs, check digits and hashes. - [Encodings](https://validity-kt.dev/constraints/encodings.md): Base64, Base32, Base58, hexadecimal and JSON. - [Finance](https://validity-kt.dev/constraints/finance.md): Card numbers, IBANs, BICs, ISINs, currency codes and crypto addresses. - [Location](https://validity-kt.dev/constraints/location.md): Countries, languages, locales, time zones, coordinates and postal codes. - [Colors](https://validity-kt.dev/constraints/colors.md): Hexadecimal, RGB and HSL colors, as CSS writes them. - [Date formats](https://validity-kt.dev/constraints/date-formats.md): Text that holds an ISO 8601 date, time, date-time or duration, or a date in a pattern of yours. - [Countries](https://validity-kt.dev/constraints/countries.md): National documents, tax numbers and license plates, country by country. - [Phone numbers](https://validity-kt.dev/constraints/phone.md): phone, mobilePhone, countryCode and areaCode, by the metadata of Google's libphonenumber, in the validity-phone module. - [All messages](https://validity-kt.dev/reference/messages.md): Every default message of Validity, the constraints that use it, and a template to translate them all. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.