/*
 * Copyright (C) 2018 Robert Bosch GmbH Copyright (C) 2018 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
 */

import { AbstractControl } from '@angular/forms';

export class LocationFormValidator {
  static checkGeoPosition(control: AbstractControl) {
    const longitude = control.get('geoCoordinate.longitude');
    const latitude = control.get('geoCoordinate.longitude');
    if (!longitude || !latitude) {
      return { incomplete: true };
    }
    return null;
  }
}
