You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In validateProperty we take a pretty strict definition (by php standards) for the columns defined as 'text'. A php number will be rejected. In my case, I had an array key that was numeric (for one record_id) and when I tried to save it into an entity defined as a 'text' field (as some other records are alpha) - it failed.
I had to explicitly cast it as a string in the payload to the entity before trying to create the new record. One might consider allowing numeric integers as well to be more 'REDCap-like'...
case 'text':
if (!is_string($value)) {
return false;
}
break;
Or, am I missing something here...
The text was updated successfully, but these errors were encountered:
In
validateProperty
we take a pretty strict definition (by php standards) for the columns defined as 'text'. A php number will be rejected. In my case, I had an array key that was numeric (for one record_id) and when I tried to save it into an entity defined as a 'text' field (as some other records are alpha) - it failed.I had to explicitly cast it as a string in the payload to the entity before trying to create the new record. One might consider allowing numeric integers as well to be more 'REDCap-like'...
Or, am I missing something here...
The text was updated successfully, but these errors were encountered: