mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 07:40:39 -04:00
Use @inputmode="number" instead of <input type="number">
This commit is contained in:
parent
39db272cb1
commit
d3bde7d195
5 changed files with 22 additions and 13 deletions
|
@ -58,6 +58,9 @@ class Artist extends PropertiesBase{
|
|||
// *******
|
||||
|
||||
public function Validate(): void{
|
||||
$now = new DateTime('now', new DateTimeZone('UTC'));
|
||||
$thisYear = intval($now->format('Y'));
|
||||
|
||||
$error = new Exceptions\ValidationException();
|
||||
|
||||
if($this->Name === null || $this->Name == ''){
|
||||
|
@ -68,7 +71,7 @@ class Artist extends PropertiesBase{
|
|||
$error->Add(new Exceptions\StringTooLongException('Artist Name'));
|
||||
}
|
||||
|
||||
if($this->DeathYear !== null && ($this->DeathYear <= 0 || $this->DeathYear > intval(date('Y')) + 50)){
|
||||
if($this->DeathYear !== null && ($this->DeathYear <= 0 || $this->DeathYear > $thisYear + 50)){
|
||||
$error->Add(new Exceptions\InvalidDeathYearException());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue