Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

column editor only validate key name if isencrypted

Joshen Lim9f75e7704cba
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.utils.ts b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.utils.ts
index 33334c92a54..63a8436cae5 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.utils.ts
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/ColumnEditor/ColumnEditor.utils.ts
@@ -165,7 +165,7 @@ export const validateFields = (field: ColumnField) => {
if (field.format.length === 0) {
errors['format'] = `Please select a type for your column`
}
- if (field.keyId === 'create-new' && (field?.keyName ?? '').length === 0) {
+ if (field.isEncrypted && field.keyId === 'create-new' && (field?.keyName ?? '').length === 0) {
errors['keyName'] = 'Please provide a name for your new key'
}
if (field.isEncrypted && field.format !== 'text') {