Skip to content

Commit 1895790

Browse files
Copilothotlong
andcommitted
Address code review feedback - improve type safety and add clearer comments
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 7ba5401 commit 1895790

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/foundation/core/src/validator.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export class Validator {
416416
}
417417

418418
// Build query filter
419-
const filters: any = {};
419+
const filters: Record<string, any> = {};
420420

421421
// Add field conditions
422422
for (const field of fieldsToCheck) {
@@ -432,8 +432,9 @@ export class Validator {
432432

433433
// Handle case sensitivity for string values
434434
if (typeof fieldValue === 'string' && rule.case_sensitive === false) {
435-
// For case-insensitive, we would need regex or toLowerCase comparison
436-
// This is a simplified implementation - driver-specific logic may be needed
435+
// NOTE: Case-insensitive comparison requires driver-specific implementation
436+
// Some drivers support regex (MongoDB), others use LOWER() function (SQL)
437+
// For now, we use exact match - driver adapters should implement case-insensitive logic
437438
filters[field] = fieldValue;
438439
} else {
439440
filters[field] = fieldValue;

0 commit comments

Comments
 (0)