Skip to content

Commit

Permalink
Merge pull request #206 from creative-commoners/pulls/2/field-validators
Browse files Browse the repository at this point in the history
FIX Change type to Int
  • Loading branch information
GuySartorelli authored Nov 6, 2024
2 parents 0003606 + 020bbb0 commit 4ecbf4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/BasicFieldsTestPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class BasicFieldsTestPage extends TestPage
'TimeHTML5' => 'Time',
'ToggleCompositeTextField1' => 'Varchar',
'ToggleCompositeDropdownField' => 'Varchar',
'Validated' => 'Text',
'Validated' => 'Int',
);

private static $has_one = array(
Expand Down Expand Up @@ -187,7 +187,7 @@ public function getDefaultData()
'Time' => "23:59",
'TimeHTML5' => "23:59",
'ToggleCompositeTextField1' => 'My value (ä!)',
'Validated' => '1',
'Validated' => 1,
);
}

Expand Down
2 changes: 1 addition & 1 deletion code/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function requireDefaultRecords()
$company = new Company();
$company->Name = $companyData[0];
$company->Category = $companyData[1];
$company->Revenue = $companyData[2];
$company->Revenue = (float) $companyData[2];
$company->CEO = $companyData[3];
$company->write();
}
Expand Down

0 comments on commit 4ecbf4a

Please sign in to comment.