Tag Archives: validation

Yii client validation not working on ajax loaded form

Questions: When I open the page with normal request (non ajax), everything works fine. But when I load that form with ajax, the client validation in that form does not work. The form generator is classic gii-generated stuff: $form = $this->beginWidget(‘CActiveForm’, array( ‘id’=>’cat-form’, ‘enableAjaxValidation’=>true, ‘action’ => …, ‘clientOptions’=>array(‘validateOnSubmit’=>true), ) ); // – form inputs go… Read More »

jQuery Validation & Form Plugin

Questions: I have been working with the jQuery form plugin and the jQuery Validation plugin: Form: http://jquery.malsup.com/form/ Validation: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ I am trying to work with both of them to play nice toegther in terms of validate document, THEN submit using the jQuery form plugin. Any ideas? Answers: from the docs: $(“.selector”).validate({ submitHandler: function(form) { $(form).ajaxSubmit();… Read More »

remove data validation of HSSF sheet using Apache POI

Questions: How to remove the data validation of excel from using apache POI. I have following code. On first run, the dropdowns are getting created properly, but the same is not getting updated once I run the program again with different values in the String List. FileInputStream fsIP= new FileInputStream(new File(“D:\\template3.xls”)); //Read the spreadsheet that… Read More »

DbEntityValidationException – How can I easily tell what caused the error?

Questions: I have a project that uses Entity Framework. While calling SaveChanges on my DbContext, I get the following exception: System.Data.Entity.Validation.DbEntityValidationException: Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details. This is all fine and dandy, but I don’t want to attach a debugger every time this exception occurs. More over,… Read More »

Cloudflare and Domain Validation SSL

Questions: I managed to get a Comodo Domain Validation SSL and install into my box with NGINX for a Meteor app running. When visiting the site directly, I see the correct certificate. However, when I enable Cloudflare + Universal SSL + then choose Full (Strict), I still see a Cloudflare issued certificate. Is this supposed… Read More »

XSD validation error: Element '{http://www.example.com}Scope': This element is not expected. Expected is ( Scope )

Questions: I created the following XSD (with Eclipse): <?xml version=”1.0″ encoding=”UTF-8″?> <schema targetNamespace=”http://www.example.com” xmlns=”http://www.w3.org/2001/XMLSchema” xmlns:tns=”http://www.example.com”> <element name=”Make”> <complexType> <sequence> <element name=”Scope”></element> </sequence> </complexType> </element> </schema> and validating with this simple XML <?xml version=”1.0″?> <Make xmlns=”http://www.example.com”> <Scope> </Scope> </Make> gives: xmllint.exe –noout –schema sources.xsd sources.xml sources.xml:3: element Scope: Schemas validity error : Element ‘{http://www.example.com}Scope’: This element… Read More »

XML DTD/Schema validation in Maven

Questions: How can I validate XML documents during a Maven build against a DTD or a XSD Schema? Answers: There is a xml-maven-plugin that can check whether XML files are matching an XML schema but I don’t think it can generate reports. Questions: Answers: The validate goal of the xml-maven-plugin will check for well-formedness and… Read More »