fix: [broods] Added validation

pull/67/head
mokaddem 2021-06-29 16:19:13 +02:00
parent 217ec250f0
commit e6a1cf019d
1 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,11 @@ class BroodsTable extends AppTable
public function validationDefault(Validator $validator): Validator
{
return $validator;
return $validator
->requirePresence(['name', 'url', 'organisation'], 'create')
->notEmptyString('name')
->notEmptyString('url')
->url('url');
}
public function genHTTPClient(Object $brood, array $options=[]): Object