I have a project where I am storing leads about users, naturally those need to be encrypted.
Encrypting data from text fields works as expected, but any other type of field throws validation errors.
For example, In this example the field to record the user's gender throws validation error
I've also attached my encryption and decryption functions.
Can someone tell me what I'm doing wrong?