Validation Issue in html fieldCheckout uiComponent (input field) rendered multiple times: how do I apply viewmodel functionality to current input field only?Magento 2 add custom product attribute validation from install scriptMagento 2 checkout input field validation possibilityMagento 2.1 Create a filter in the product grid by new attributeMagento 2 Add new field to Magento_User admin formMagento 2: How to add a Color Picker in Grid?Magento2 : how to set per website is_required custom attribute for account creation formMake required field to Gift Option in Magento 2Add class or data-attribute to product optionsMagento 2 Create new “Catalog Input Type for Store Owner” Attribute
How do I handle a potential work/personal life conflict as the manager of one of my friends?
Bullying boss launched a smear campaign and made me unemployable
How seriously should I take size and weight limits of hand luggage?
How to prevent "they're falling in love" trope
Could the museum Saturn V's be refitted for one more flight?
Alternative to sending password over mail?
Intersection Puzzle
Size of subfigure fitting its content (tikzpicture)
How do I deal with an unproductive colleague in a small company?
What does “the session was packed” mean in this context?
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
Is it inappropriate for a student to attend their mentor's dissertation defense?
Why is this clock signal connected to a capacitor to gnd?
iPad being using in wall mount battery swollen
How would I stat a creature to be immune to everything but the Magic Missile spell? (just for fun)
How do I gain back my faith in my PhD degree?
Short story with a alien planet, government officials must wear exploding medallions
Dreadful Dastardly Diseases, or Always Atrocious Ailments
How can I determine if the org that I'm currently connected to is a scratch org?
Am I breaking OOP practice with this architecture?
Why doesn't using multiple commands with a || or && conditional work?
How can saying a song's name be a copyright violation?
Why no variance term in Bayesian logistic regression?
What is a romance in Latin?
Validation Issue in html field
Checkout uiComponent (input field) rendered multiple times: how do I apply viewmodel functionality to current input field only?Magento 2 add custom product attribute validation from install scriptMagento 2 checkout input field validation possibilityMagento 2.1 Create a filter in the product grid by new attributeMagento 2 Add new field to Magento_User admin formMagento 2: How to add a Color Picker in Grid?Magento2 : how to set per website is_required custom attribute for account creation formMake required field to Gift Option in Magento 2Add class or data-attribute to product optionsMagento 2 Create new “Catalog Input Type for Store Owner” Attribute
I am using the UI component form with some additional attribute field using an HTML template. But I am not able to validate these field as par standard. required property is not working.
Example:
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' ">
</select>
</section>
magento2
add a comment |
I am using the UI component form with some additional attribute field using an HTML template. But I am not able to validate these field as par standard. required property is not working.
Example:
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' ">
</select>
</section>
magento2
add a comment |
I am using the UI component form with some additional attribute field using an HTML template. But I am not able to validate these field as par standard. required property is not working.
Example:
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' ">
</select>
</section>
magento2
I am using the UI component form with some additional attribute field using an HTML template. But I am not able to validate these field as par standard. required property is not working.
Example:
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' ">
</select>
</section>
magento2
magento2
edited 2 days ago
Ajay Jain
asked 2 days ago
Ajay JainAjay Jain
214
214
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You need to add data-validate binding like below ;
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' " data-validate="required:true">
</select>
</section>
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268213%2fvalidation-issue-in-html-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to add data-validate binding like below ;
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' " data-validate="required:true">
</select>
</section>
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
add a comment |
You need to add data-validate binding like below ;
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' " data-validate="required:true">
</select>
</section>
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
add a comment |
You need to add data-validate binding like below ;
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' " data-validate="required:true">
</select>
</section>
You need to add data-validate binding like below ;
<section class="admin__page-section price-lab attribute-lab-3">
<label class="attr-label" for="nego">Nego </label>
<select required data-form-part="merchandising_builder_form" name="nego[]" class="negolist " id="nego" multiple size="8"
data-bind="options: negoOptions,
optionsText: 'value', optionsValue: 'id' " data-validate="required:true">
</select>
</section>
answered 2 days ago
Vivek KumarVivek Kumar
2,5672729
2,5672729
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
add a comment |
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi Vivek, thanks for replying I tried but it is not working.
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
Hi All, Now it's working in with jquery validation. i have added class class="required-entry"
– Ajay Jain
2 days ago
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f268213%2fvalidation-issue-in-html-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown