Remove post user/day, and reformat validators

This commit is contained in:
Tom Bloor 2017-09-08 12:46:54 +01:00
parent c6679e1261
commit 4176c61c00
4 changed files with 44 additions and 53 deletions

View file

@ -53,9 +53,9 @@ sub register {
return $app->types->type($extension) eq $filetype ? undef : 1;
});
$app->validator->add_check( is_iso_datetime => sub {
$app->validator->add_check( is_iso_date => sub {
my ( $validation, $name, $value ) = @_;
$value = $app->datetime_formatter->parse_datetime( $value );
$value = $app->iso_date_parser->parse_datetime( $value );
return defined $value ? undef : 1;
});