required

Which CMake version as the minimum?

本秂侑毒 提交于 2019-11-30 11:19:58
I want to define a minimum version to CMake with "cmake_minimum_required" facility. I have seen that some project set minimum version 2.8 some others set 3.0 or 3.2. I would like to learn your opinions and best practices about the topic. The cmake_minimum_required() function is used to avoid any cryptic error messages due to the CMakeLists.txt assuming a later version of CMake than the one installed on the current host. As an example, failing early, and with a clear message... CMake 3.2 or higher is required. You are running version 2.8.12.2 ...is to be preferred over something more cryptic

textarea's “required” attribute doesn't work even though the value is empty

情到浓时终转凉″ 提交于 2019-11-30 11:05:06
I created a simple page with list box and text area with conditions that all should be required. List box are working fine, but textarea box doesn't tell that the field is required to be filled. <!DOCTYPE html> <html> <head> <title>Ratings & Reviews</title> <body> <form> <span>Customer Service*</span> <span> <select name=customer id=aa required> <option selected="rate" value="" disabled>rate</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> </select> </span> <br><br> <span>Value for money*</span>

required attribute of inputText should depend on submitted value of another component

落爺英雄遲暮 提交于 2019-11-30 07:31:57
I have a form which contains a dropdown and two input fields. <h:selectOneMenu /> <h:inputText /> <h:inputText /> I would like to make the required attribute of the input fields conditional depending on the selected value of the dropdown. If the user chooses the first item of the dropdown, then the input fields must be required. If the user chooses the second item, then those would not be required. How can I achieve this? BalusC Just bind the dropdown to the view and directly check its value in the required attribute. <h:selectOneMenu binding="#{menu}" value="#{bean.item}"> <f:selectItem

Angular is automatically adding 'ng-invalid' class on 'required' fields

巧了我就是萌 提交于 2019-11-29 23:48:58
I am building an angular app for which I have some forms set up. I have some fields that are required to be filled before submission. Therefore I have added 'required' on them: <input type="text" class="form-control" placeholder="Test" ng-model="data.test" required> However when I launch my app, the fields are displayed as 'invalid' and the classes 'ng-invalid' and 'ng-invalid-required' even before the submit button has been click or before the user has typed anything in the fields. How can I make sure that thoses 2 classes are not added immediately but either once the user has submitted the

@XmlElement(required=true) for @WebParam does not work

本秂侑毒 提交于 2019-11-29 12:25:54
问题 I'm building web service using JAX-WS. I have a strange problem that the annotation @XmlElement(required=true) for @WebParam works in some @WebService class, but doesn't work in some others. I have very similar code in the two @WebService classes. What may cause this problem? Parameter type or the entity class? Edit: Add sample code I have two web services: @WebService(name = "ClubMemberPortType", serviceName = "ClubMemberService", portName = "ClubMemberSoapPort", targetNamespace = "http:/

Which CMake version as the minimum?

强颜欢笑 提交于 2019-11-29 12:02:11
问题 I want to define a minimum version to CMake with "cmake_minimum_required" facility. I have seen that some project set minimum version 2.8 some others set 3.0 or 3.2. I would like to learn your opinions and best practices about the topic. 回答1: The cmake_minimum_required() function is used to avoid any cryptic error messages due to the CMakeLists.txt assuming a later version of CMake than the one installed on the current host. As an example, failing early, and with a clear message... CMake 3.2

html5 required validator not working with input type=button

南楼画角 提交于 2019-11-29 10:22:36
Here is my html code <form id="form1" runat="server"> <input id="q" required /> <input id="btn" type="submit" value="Search"> </form> I have used html5 required field validators, it works but with a post back. so modified the code as follows to avoid postback <form id="form1" runat="server"> <input id="q" required /> <input id="btn" type="button" value="Search"> </form> But the required validator doesn't work That's because the required validator is only called on submit, and the type=button is not a submit. Try this ( http://jsfiddle.net/upgradellc/vrTLw/ ): <form id="form1" runat="server">

required attribute of inputText should depend on submitted value of another component

杀马特。学长 韩版系。学妹 提交于 2019-11-29 10:01:01
问题 I have a form which contains a dropdown and two input fields. <h:selectOneMenu /> <h:inputText /> <h:inputText /> I would like to make the required attribute of the input fields conditional depending on the selected value of the dropdown. If the user chooses the first item of the dropdown, then the input fields must be required. If the user chooses the second item, then those would not be required. How can I achieve this? 回答1: Just bind the dropdown to the view and directly check its value in

Safari is not acknowledging the “required” attribute. How to fix it?

↘锁芯ラ 提交于 2019-11-29 03:25:15
<form id="customerForm"> <label> First Name: <input id="firstName" required /> </label> <label> Social Security Number: <input id="ssn" required pattern="^d{3}-d{2}-d{4}$" title="Expected pattern is ###-##-####" /> </label> <input type="submit" /> </form> When I try that document in Chrome, it accepts the conditions and shows the error, as expected. But when I try that document in Safari, it shows no error. At this time, Safari doesn't support the "required" input attribute. http://caniuse.com/#search=required To use the 'required' attribute on Safari, You can use ' webshim ' 1 - Download

How not to validate HTML5 text box with required attribute

﹥>﹥吖頭↗ 提交于 2019-11-29 01:15:32
I have one HTML text box (for quantity) and two HTML buttons (Add, Cancel) inside my form. <form> <input type="number" min="1" max="100" required /> <button type="button">Add</button> <button type="button">Cancel</button> </form> I do not want my second button (cancel) to validate the form when clicked. Is this possible? In ASP.NET, I can use CausesValidation="false" to not trigger the validation. Try this; <button type="button" formnovalidate>Cancel</button> I changed your code: What you want is that your form should not be validated on click of cancel, so that's why i added the