Как получить следующий HTML, созданный с использованием шаблона закрытия?
<input name="fullName" class="large" type="text" data-validate="{required:true, minlength: 5, maxlength:100, messages:{required:'Please provide your Full Name.', maxlength:'This field can contain maximum 100 characters.'}}"/>
Любая помощь приветствуется.
Вот то, что я пробовал до сих пор.
{namespace myApp.test}
/**
* Template for UI of Create User View
* @param userToEdit It is the object returned from GET on User Resource.
*/
{template .testUser autoescape="false"}
{{msg desc="<input id=\"fullName\" name=\"fullName\" class=\"large\" type=\"text\" value=\"{$userToEdit.FullName}\" data-validate=\"{required:true, minlength: 5, maxlength:100, messages:{required:\'Please provide your Full Name.\', maxlength:\'This field can contain maximum 100 characters.\'} }\" />"}}
{/template}
Возвращает Malformed attributes in tag
Ошибка.
{namespace myApp.test}
/**
* Template for UI of Create User View
* @param userToEdit It is the object returned from GET on User Resource.
*/
{{template .testUser autoescape="false"}}
<input id="fullName" name="fullName" class="large" type="text" value="{{$userToEdit.FullName}}" data-validate="{required:true, minlength: 5, maxlength:100, messages:{required:'Please provide your Full Name.', maxlength:'This field can contain maximum 100 characters.'} }" />
{{/template}}
Возврат Tag 'template' not at start of line [line 6, column 1].
Ошибка.
{namespace myApp.test}
/**
* Template for UI of Create User View
* @param userToEdit It is the object returned from GET on User Resource.
*/
{template .testUser autoescape="false"}
<input id="fullName" name="fullName" class="large" type="text" value="{$userToEdit.FullName}" data-validate="{required:true, minlength: 5, maxlength:100, messages:{required:'Please provide your Full Name.', maxlength:'This field can contain maximum 100 characters.'} }" />
{/template}
Возвращает template .testUser: Left brace '{' not allowed within a Soy tag delimited by single braces (consider using double braces to delimit the Soy tag) [line 7, column 164].
Ошибка.
{namespace myApp.test}
/**
* Template for UI of Create User View
* @param userToEdit It is the object returned from GET on User Resource.
*/
{template .testUser autoescape="false"}
<input id="fullName" name="fullName" class="large" type="text" value="{$userToEdit.FullName}" data-validate="{{required:true, minlength: 5, maxlength:100, messages:{{required:'Please provide your Full Name.', maxlength:'This field can contain maximum 100 characters.'}} }}" />
{/template}
Возвращает template .testUser: Double left brace '{{' not allowed within a Soy tag delimited by double braces (consider inserting a space: '{ {') [line 7, column 165].
ошибка.
{namespace myApp.test}
/**
* Template for UI of Create User View
* @param userToEdit It is the object returned from GET on User Resource.
*/
{template .testUser autoescape="false"}
<input id="fullName" name="fullName" class="large" type="text" value="{$userToEdit.FullName}" data-validate="{{required:true, minlength: 5, maxlength:100, messages:{ {required:'Please provide your Full Name.', maxlength:'This field can contain maximum 100 characters.'} } }}" />
{/template}
Возвращает template myApp.test.testUser: Not all code is in Soy V2 syntax (found tag {{print required:true, minlength: 5, maxlength:100, messages:{ {required:'Please provide your Full Name.', maxlength:'This field can contain maximum 100 characters.'} } }} not in Soy V2 syntax).
ошибка.