Skip to content

Commit 131fd50

Browse files
author
Szymon Olewniczak
committed
fix: to proper handle placeholders in default values for struct fields, we must validate them only on submit
1 parent 89be912 commit 131fd50

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

helper/field.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function initialize($args) {
4343
protected function setVal($value) {
4444
if(!$this->column) {
4545
$value = '';
46-
} else {
46+
//don't validate placeholders here
47+
} elseif($this->replace($value) == $value) {
4748
$validator = new ValueValidator();
4849
$this->error = !$validator->validateValue($this->column, $value);
4950
if($this->error) {

0 commit comments

Comments
 (0)