谁能告诉我如果EducationEvent没有得到startDate
andendDate
怎么办,因为它还不知道?如果我为它设置一个空值($startIso
是一个空字符串):
<meta itemprop="startDate" content="{{ $startIso }}" />
我得到:
错误:缺少必填字段“dtstart”。验证器中的错误消息。
这是代码:
<div itemscope itemtype="http://schema.org/EducationEvent">
<h1 class="columns">
<span itemprop="name">{{ $courseTypesDescription->course_type_name }}</span>
</h1>
<div class="dates columns">
<div class="row">
<div class="large-5 medium-6 columns">
@if ($start != "")
<meta itemprop="startDate" content="{{ $startIso }}" />
@endif
<i class="fa fa-calendar"></i>
<span class="text">Start: </span>
<span class="data"> @if ($start != "") {{ $start }} @else N/A @endif</span>
</div>
<div class="large-5 medium-6 columns end">
@if ($exam != "")
<meta itemprop="endDate" content="{{ $examIso }}" />
@endif
<i class="fa fa-pencil-square-o"></i>
<span class="text">Exam: </span>
<span class="data"> @if ($exam != "") {{ $exam }} @else N/A @endif </span>
</div>
</div>
</div>
<article class="description columns" itemprop="description">
{{ $courseTypesDescription->course_type_desc }}
</article>
</div>