Questions tagged [required-field]

Indicates the required status of data field, where "required" is contrasted from "optional". Such status generally indicates that any [non-null] value is considered acceptable when populating or evaluating a specific field or fields.

Overview

The designation required-field indicates the required status of a data field, where "required" is contrasted from "optional".

Such status generally indicates that any non-null value is considered acceptable when populating or evaluating a specific field or fields.

This designation applies to any of various contexts, but is primarily associated with data-entry and data-validation.

136 questions
1
vote
0 answers

Customize required message for GenderEnum type radio button

I'm trying show this message "O campo sexo é obrigatório" when the guest doesn't check the Gender radio, but all that I get is show: "The Model field is required." Code is here: // GenderEnum.cs namespace Diorama.Site.Models { public enum…
1
vote
2 answers

Can I add the required attribute to an input field using css?

I have a recaptcha widget in my form and i want it to be made mandatory. since i dont have any direct control over the widget in my html, i was wondering if i can add the required attribute to it after it has been rendered. ie. if i add the folloing…
Rishav Sharan
  • 2,763
  • 8
  • 39
  • 55
0
votes
1 answer

Mainpulating Jquery validate to have an input as required and do email validation

I need to validate the following form. Some fields are just required, however the email field needs to include email validation. I have tried the following code: Note: If I take out the 'rules' part, the validation works on all required fields…
0
votes
2 answers

How to create string template with validation message and watermark in MVC 3

I'd like to create template for string, that will include label, textbox with watermark and validation message for registration form. In addition, I'd like to add notice (eg. star), that the field is required by getting it from model. So far I have…
Andree
  • 1,159
  • 2
  • 17
  • 32
0
votes
1 answer

Javascript jQuery required items in a survey

I'm building a multi-question survey where I'm using javascript to: make sure all survey questions displayed on a page are answered show an additional question on a page based on the answer to a previous item. Both 1 and 2 seem to be working in…
Mike E
  • 31
  • 1
  • 7
0
votes
1 answer

MVC3 Required validation, choose value for empty

I have a hidden field which is bound to a int Id in the model, it has a required attribute and some fancy ajax code to set the id client side, the problem is that zero should be acounted as empty. Now the validation will succeed even if no Id has…
Anders
  • 17,306
  • 10
  • 76
  • 144
0
votes
0 answers

How to set the state field to required? Add filter code and plug-ins not working

I need to have the state field in billing and shipping set as required. I've tried to add custom code to the function.php, intalled various checkout plug-ins, changed the theme etc.but nothing is working. The field is still shown as optional. Any…
jadalo
  • 1
  • 1
0
votes
1 answer

Is it possible to add a custom validation message to my required field?

I have an EditForm with some InputText. Some of the textboxes are required and as such in their class are declared using the [Required]. However some of them also have a [StringLength(100, ErrorMessage = "Forename is too long")]. When the forename…
0
votes
1 answer

how I create a form input text readonly and required at the same time?

I'm reviewing my code wrote time ago. The input text that I wrote is the following: I tested the form and with my…
0
votes
0 answers

How to make a required field Disable on a certain view?

In my ASP.NET Core application, I have a BassModel class. In it, I have a field that is marked as required: [Required(ErrorMessage = "Required field")] public string InputText { get; set; } So all other classes were inherited from this class. Now…
Prageeth Liyanage
  • 1,612
  • 2
  • 19
  • 41
0
votes
0 answers

October CMS - Magic Forms Plugin - Upload Form - Make file upload field required

I put Upload AJAX Form on my page and made some fields required. But I tried to make hidden input in file upload section required too and it didn't work. I tried and laravel validation in the component like…
0
votes
1 answer

HTML Form either of two options need to be filled completely

So I've been stuck on this part of my HTML form. Either the dropdown "A" needs to be selected or ALL options by "B" need to be filled out. Either one of them is required, but I just can't find a solution for that. To make it more clear what needs to…
Kuro
  • 3
  • 1
0
votes
0 answers

Why is my browser preventing me from submitting empty fields ? Symfony

I made a form that allows users to register. There is one question that asks what language they want to learn. In order to make the question optional I created the new field type to my User entity in Terminal and I specified that it can be…
Emilie Tossan
  • 127
  • 1
  • 1
  • 16
0
votes
0 answers

FastAPI subclass asks for required field from inherited class

I tried some stuffs but without success In my project I have: a model Hospital and a model User (I keep in distinct files) a schema Hospital and shema User (I keep in distinct files too) The relationship is one to one. I need add to my response…
0
votes
0 answers

The bootstrap required error message is not visible outside the browser window

There is a form with a lot of input fields, so you have to scroll down to the bottom of the page for the save button to work. However, if I do not fill in a required field, it scrolls to the top of the page, where the required field is located, but…