File tree 1 file changed +2
-2
lines changed 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
711
711
712
712
private function validate_unique (mixed $ value ) : string
713
713
{
714
- $ class = '\\' . \PHPFUI \ORM ::$ tableNamespace . '\\' . $ this ->record ->getTableName ();
714
+ $ class = '\\' . \PHPFUI \ORM ::$ tableNamespace . '\\' . \ PHPFUI \ ORM :: getBaseClassName ( $ this ->record ->getTableName () );
715
715
$ table = new $ class ();
716
716
// look up the record in the table. Can't be itself.
717
717
$ condition = new \PHPFUI \ORM \Condition ();
@@ -756,7 +756,7 @@ private function validate_unique(mixed $value) : string
756
756
757
757
$ table ->setWhere ($ condition );
758
758
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 } ]);
760
760
}
761
761
762
762
private function validate_url (mixed $ value ) : string
You can’t perform that action at this time.
0 commit comments