Skip to content

Conversation

@majiayu000
Copy link

Fixes #53

Changes

  • Add validateOpenAIKey function to validate OpenAI API keys (must start with "sk-" and be at least 20 characters)
  • Integrate validation in the Models settings page before form submission
  • Display clear error messages when validation fails
  • Clear validation errors when user modifies the input

Add validation for OpenAI API key format in the Models settings component:
- Add validateOpenAIKey function to utils.tsx that validates keys start with "sk-" and are at least 20 characters
- Add validation state and error handling in Models.tsx
- Display validation error message using CustomInput's error props
- Prevent form submission when validation fails
- Clear validation errors when user modifies the input

Closes TransformerOptimus#53

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: majiayu000 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add OpenAI key validation in settings page

1 participant