<?php
/**
 * Created by PhpStorm.
 * User: Imac
 * Date: 24/04/2019
 * Time: 14:40
 */

namespace Actigraph\ActipageBaseBundle\Services\EspaceClient;


class ValidateInscriptionSmsService implements ValidateFormEspaceClient
{

    public function __construct()
    {

    }


    public function renderHtml()
    {
        return "";
    }

    public function validateData($postData)
    {
        if(isset($postData["sms"])){
            $data = $postData["sms"];
            $error = array();
            if(isset($data["Ligne"]) && strlen($data["Ligne"]) < 7)
                array_push($error, "La ligne doit être supérieur à 5");


            if (count($error) > 0)
                return $error;
        }

        return true;
    }
    public function saveData($postData){
        if(isset($postData["sms"])){
            $data = $postData["sms"];

        }

        return true;
    }

}