File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -711,7 +711,7 @@ private function validate_time(mixed $value) : string
711711
712712 private function validate_unique (mixed $ value ) : string
713713 {
714- $ class = '\\' . \PHPFUI \ORM ::$ tableNamespace . '\\' . $ this ->record ->getTableName ();
714+ $ class = '\\' . \PHPFUI \ORM ::$ tableNamespace . '\\' . \ PHPFUI \ ORM :: getBaseClassName ( $ this ->record ->getTableName () );
715715 $ table = new $ class ();
716716 // look up the record in the table. Can't be itself.
717717 $ condition = new \PHPFUI \ORM \Condition ();
@@ -756,7 +756,7 @@ private function validate_unique(mixed $value) : string
756756
757757 $ table ->setWhere ($ condition );
758758
759- return $ this ->testIt (0 == (\is_countable ($ table ) ? \count ($ table ) : 0 ), 'unique ' , ['value ' => $ value ]);
759+ return $ this ->testIt (0 == (\is_countable ($ table ) ? \count ($ table ) : 0 ), 'unique ' , ['value ' => $ this -> record ->{ $ this -> currentField } ]);
760760 }
761761
762762 private function validate_url (mixed $ value ) : string
You can’t perform that action at this time.
0 commit comments