You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: client_credentials.go
    path of file: ./repos/photoprism/internal/form
    
    the code of the file until where you have to start completion: package form

import (
	"fmt"

	"github.com/photoprism/photoprism/pkg/clean"
	"github.com/photoprism/photoprism/pkg/rnd"
)

// ClientCredentials represents client authenticatio
    
func (f ClientCredentials) Validate() error {
	// Check client ID.
	if f.ClientID == "" {
		return fmt.Errorf("missing client id")
	} else if rnd.InvalidUID(f.ClientID, 'c') {
		return fmt.Errorf("invalid client id")
	}

	// Check client secret.
	if f.ClientSecret == "" {
		return fmt.Errorf("missing client secret")
	} else if !rnd.IsAlnum(f.ClientSecret) {
		return fmt.Errorf("invalid client secret")
	}

	return nil
}