| 1 | package Sah::Schema::multi_line_str; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 6 | 1 | our $DATE = '2024-02-06'; # DATE | |
| 7 | 1 | our $DIST = 'Sah-Schemas-Str'; # DIST | |
| 8 | 1 | our $VERSION = '0.018'; # VERSION | |
| 9 | |||
| 10 | 1 | our $schema = ['str' => { | |
| 11 | summary => 'A multi-line string', | ||
| 12 | description => <<'MARKDOWN', | ||
| 13 | |||
| 14 | String cannot be empty or just contain a single line of text; it must contain at | ||
| 15 | least one of either \x0D or \x0A character. | ||
| 16 | |||
| 17 | MARKDOWN | ||
| 18 | match => qr/[\x0a\x0d]/, | ||
| 19 | examples => [ | ||
| 20 | {value=>'', valid=>0}, | ||
| 21 | {value=>'a', valid=>0}, | ||
| 22 | {value=>"line1\nline2", valid=>1}, | ||
| 23 | ], | ||
| 24 | }]; | ||
| 25 | |||
| 26 | 1 | 1; | |
| 27 | # ABSTRACT: | ||
| 28 | |||
| 29 | __END__ | ||