/** * WordPress dependencies */ import { _x } from '@safe-wordpress/i18n'; /** * External dependencies */ import { isEmpty } from '@nab/utils'; /** * Internal dependencies */ import type { Attributes } from './types'; export function validate( { location, }: Attributes ): Partial< Record< keyof Attributes, string > > { if ( isEmpty( location ) ) { return { location: _x( 'Please select one or more locations', 'user', 'nelio-ab-testing' ), }; } return {}; }