Improve PAT expiration validation error messages
What does this MR do and why?
- Follow-up from previous MR
- #410965 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Create a PAT with an expiration date more than 365 days in the future
PersonalAccessToken.create!(expires_at: 2.years.from_now, user:User.last, scopes: ['api'])
- See a beautiful error message
ActiveRecord::RecordInvalid: Validation failed: Expiration date must be before 2024-06-15 05:12:08 UTC
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jessie Young