Hello Ken63
No, a valid (Swiss) half fare card is not a prerequisite in order to buy tickets; consequently, its validity is not verified during the ticket purchase.
The only person who is interested to see your valid half fare card is the train conductor during ticket inspection.
People caught travelling with half fare tickets, yet without a valid half fare card, are subject to pay a fine, including the second half of the ticket.
Wishing you a good travel & best regards
Roland