returnerrors.add(:key,message: 'has no expiry date but an expiry date is required for SSH keys on this instance. Contact the instance administrator.')ifexpires_at.blank?
returnerrors.add(:key,message: 'has no expiration date but an expiration date is required for SSH keys on this instance. Contact the instance administrator.')ifexpires_at.blank?
# when the key is not yet persisted the `created_at` field is nil
# when the key is not yet persisted the `created_at` field is nil
errors.add(:key,message: 'has an invalid expiry date. Set a shorter lifetime for the key or contact the instance administrator.')ifexpires_at>key_creation_date+::Gitlab::CurrentSettings.max_ssh_key_lifetime.days
errors.add(:key,message: 'has an invalid expiration date. Set a shorter lifetime for the key or contact the instance administrator.')ifexpires_at>key_creation_date+::Gitlab::CurrentSettings.max_ssh_key_lifetime.days