[RSS Feed/News] JSON_ARRAY column and allowedValues

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hello all!
Let's say we have a JSON_ARRAY column (entity) and we need to specify allowedValues.

How could be achieved?
Example:
PHP:

Code:
        $structure->columns = [
            'user_id'   => ['type' => self::UINT, 'required' => true],
            'days' => ['type' => self::JSON_ARRAY, 'default' => [],
                'allowedValues' => ['', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']]
        ];
The above example of allowedValues will work with STR...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom