8000 [Validator] Add `TimezoneValidator` by phansys · Pull Request #22262 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Add TimezoneValidator #22262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove surplus quotes in validation message
  • Loading branch information
phansys committed Nov 29, 2018
commit 13bc6290d47c2d899bc721ded051e80d51db4e53
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ private function formatExtraInfo($zone, $countryCode = null)
}
}

return $this->formatValue($value);
return $value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function testInvalidGroupedTimezones($timezone, $what, $extraInfo)
$this->validator->validate($timezone, $constraint);

$this->buildViolation('myMessage')
->setParameter('{{ extra_info }}', '"'.$extraInfo.'"')
->setParameter('{{ extra_info }}', $extraInfo)
->setCode(Timezone::NO_SUCH_TIMEZONE_IN_ZONE_ERROR)
->assertRaised();
}
Expand Down Expand Up @@ -206,7 +206,7 @@ public function testInvalidGroupedTimezonesByCountry($timezone, $what, $country,
$this->validator->validate($timezone, $constraint);

$this->buildViolation('myMessage')
->setParameter('{{ extra_info }}', '"'.$extraInfo.'"')
->setParameter('{{ extra_info }}', $extraInfo)
->setCode(Timezone::NO_SUCH_TIMEZONE_IN_COUNTRY_ERROR)
->assertRaised();
}
Expand Down
0