#
View Source Ash.Type.String (ash v2.4.22)

Stores a string in the database.

A built-in type that can be referenced via `:string`.

By default, values are trimmed and empty values are set to `nil`. You can use the `allow_empty?` and `trim?` constraints to change these behaviors.

###

constraints

Constraints

- `:max_length` (`non_neg_integer/0`) - Enforces a maximum length on the value

- `:min_length` (`non_neg_integer/0`) - Enforces a minimum length on the value

- `:match` - Enforces that the string matches a passed in regex

- `:trim?` (`boolean/0`) - Trims the value. The default value is `true`.

- `:allow_empty?` (`boolean/0`) - If false, the value is set to `nil` if it's empty. The default value is `false`.

# Link to this section Summary

## Functions

match(regex)

# Link to this section Functions

Link to this function

# match(regex)

View Source