When I try to open a form that doesnt get any parameter ,"specified cast is invalid" exception is thrown. The form loads succesfully but when I call form.showdialog it's throwing the exception. I don't know ,what can I do? I can show the form only when I call it from the program.cs
Thank you
Related
ReactStrap Input Validation
Hey there! I am trying to implement validation in my form. I am using ReactStrap in my app. However, the validation isnt working for valid or invalid input. Below is what I have done. Valid ={boolean} does not give an error message (but does not work) whereas invalid gives an error message that says invalid requires a string as you can see in the error message below.
Any help is appreciated.
<FormText>Valid PPSN: 7 digits followed by a letter</FormText>
<FormFeedback valid={false}>
You will not be able to see this
</FormFeedback>
<FormFeedback invalid={true}>
You will be able to see this
</FormFeedback>
As the error clearly mentioned, you need to use string for invalid. It's basically a message to tell why the field is invalid.
I'm not completely sure if you even need valid.
I'm currently using angular-schema-form (https://github.com/json-schema-form/angular-schema-form) to generate forms based on json schema. The form generates as expected but while validating it gives me an error "Please add error message for tv4-xxx" along with the actual validation message.
Note: My work code uses UI-Bootstrap instead of Bootstrap if that matters.
Things that I've tried:
Created a local code and imported all of it's required dependencies and ran the application. I'm able to successfully validate the form fields with the appropriate error message and I do not get "Please add error message for tv4-xxx" error message.
My work code uses bower to add all of it's dependencies and as far as I'm aware it has added all of the required dependencies in the code but it still gives this error.
Screenshot of the error:
Validation error message
Expected is the actual validation error but it returns the message "Please add error message for tv4-xxx" along with the actual validation error which is undesirable.
Turns out that our angular app was validating twice, once by angular-auto-validate library and TV4.js which is used internally by angular-schema-form.
The error codes sent out by angular-schema-form were not recognized by angular-auto-validate and hence was getting "Please add error message for tv4-xxx".
Disabling the validation solved the problem.
I have a form, with some fields. When i try save, not happens and I don´t know what´s the problem.
How can i see whats happening on the save moment ?!
Thanks you!.
These are the most likely causes for a failed save:
incorrect data array structure, debug data passed for saving
failing validation, debug($this->SomeModel->validationErrors) after save
beforeSave/beforeValidate callback in model or attached behavior not returning true
sql error, turn up debug to 2
Anywhere in your view file, you get the errors like this :
<?php debug($this->AnyModel->validationErrors);?>
Aside from debugging, you display field-by-field error like this :
<?php $this->Form->error('fieldname'); ?>
This will return the message from validation rules, only if the field has thrown an error.
Hope this helps!
According to the section 'The Controller-View Relationship' located in http://www.recessframework.org/page/controlling-the-controller :
Try removing the body of the printIt method and refresh to get an error indicating no view template at 'helloWorld/views/printIt.php' can be found.
I tried this and upon refreshing the page, saw []. I checked the response header and it was of type application/json. Could this have something to do with it? I've tried installing Recess on another machine and it resulted in the same behavior.
Can someone tell me how to get an error???
I'm getting the following error for a web form page in an MVC application. I'm trying to set the parameters programmatically (so the report has an ID/year parameters and I set both with valid values), and I get the error:
The parameter '{0}' cannot be an empty string.
Parameter name: cookie.Domain
Any idea why I am getting this error and what I can do to address it?
Thanks.
OK, I figured out that part; I was passing in the text "Domain" if I passed in a null domain value (via the component that wraps the credentials). I change this to use "" if the domain is null, and it works now...
Weird.