Iāve been trying to update email addresses using a PATCH request as per the API (https://deploy-preview-90āsuitedocs.netlify.com/developer/api/version-8/json-api-new/#_update_a_module_record), but came across a 400 error: āerrorsā: { āstatusā: 400, ātitleā: null, ādetailā: āThe option āattributesā with value array is invalid.ā
After a few tests, I found my issue was due to the @ and . (full-stop) characters being blocked.
Iāve tracked this down to REGEX_FIELD_PATTERN in \Api\V8\Param\Options\Fields.php - line 10.
The REGEX_FIELD_PATTERN is very restrictive by default (I presume the intention was to stop rogue characters getting into the DB), but is too restrictive to allow changes to basic fields like email address.
Please can the REGEX_FIELD_PATTERN be changed by default from:
const REGEX_FIELD_PATTERN = ā/[^\w-,]/ā;
to
const REGEX_FIELD_PATTERN = ā/[^\w !#$%&ā*±=?^_`{|}~@.[]]/ā;
This will allow a few more characters to be usable.