Skip to content

Commit

Permalink
Allow negative priority
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Feb 15, 2022
1 parent 9d69816 commit a0a2e09
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Resources/contao/dca/tl_url_rewrite.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,15 @@
'sorting' => true,
'flag' => 12,
'inputType' => 'text',
'eval' => ['tl_class' => 'w50', 'rgxp' => 'natural'],
'eval' => ['tl_class' => 'w50'],
'sql' => ['type' => 'integer', 'default' => '0'],
'save_callback' => [static function ($value) {
if (!preg_match('/^-?\d+$/', $value)) {
throw new \RuntimeException($GLOBALS['TL_LANG']['ERR']['digit']);
}

return $value;
}]
],
'comment' => [
'label' => &$GLOBALS['TL_LANG']['tl_url_rewrite']['comment'],
Expand Down

0 comments on commit a0a2e09

Please sign in to comment.