Microsoft Access - not using a validation code - validation

Under PostCode, I've put an input mask as well as a validation rule of 'Is Not Null'
The input mask is working fine. However, the validation rule isn't working as it allows the postcode to be null.
Is there a way to fix this?

Options I can see:
Nz([Postcode],"")<>""
set field as required in table and let Access nag users
validation code in BeforeUpdate event of control and form

Related

Laravel Voyager Relationships Validation Error

Similar issue to: 4920 and 5108 in Github
After creating a relationship and setting them as "required" to have input:
Relationship with Rule/Validation
If there is nothing in the field after I submit, the validation message appears which is the expected behavior. Whenever I input anything into the field and submit, the form still releases the error message and won't let me submit the form which is unexpected.
Error
If I remove the JSON validation, it works and just submits as null/empty. I need the validation.
In 4920 and 5108 they said they solved it by placing the validation in a different field, but they didn't state where or which field to input the validation; can anyone point me in the right direction or tell me what the right field is?

Pre-filling a hosted MailChimp signup form with an email address shows validation errors

We're trying to pre-fill the email address field of a hosted MailChimp form. Here's the blog post that talks about exactly this matter: https://blog.mailchimp.com/how-to-pre-fill-items-on-your-mailchimp-hosted-form/.
So here's our Newsletter signup form without any validation errors:
https://camping.us2.list-manage.com/subscribe/post?u=761a52bbd46ab21474b3af314&id=5cc638b5e6.
The problem arises when I add an email address to the URL as the value for the first form field, MERGE0, like this (url-encoding the email address, so # becomes %40):
https://camping.us2.list-manage.com/subscribe/post?u=761a52bbd46ab21474b3af314&id=5cc638b5e6&MERGE0=test%40camping.info.
Now, the form correctly copies the email address into the input field with name MERGE0 but it also displays three validation error messages:
Note: the email address field is mandatory.
When I try to pre-fill the user's first or last name fields adding MERGE1=John or MERGE2=Doe to the form's url, all is well - no error happens. It seems to be a problem with mandatory fields.
I'm arguing that this is a problem on MailChimp's side but they refuse to help saying that this is custom code and none of their business.
Can anybody help fix these errors?
It turned out that the problem was caused by a mistake in the URL.
Instead of camping.us2.list-manage.com/subscribe/POST?u=761a52bbd46ab...
it had to be camping.us2.list-manage.com/subscribe?u=761a52bbd46ab...
And the errors were gone!
This really made sense in the end, because posting the form should actually trigger the validation.

Angular2 dynamically update validation rules

In Angular2 I need to modify validation rules dynamically.On the selection of a value from a dropdown validation rules will be fetched from the database and they would be like
{filedName : FirstName, required : 1}.
Currenlty I'm suing template driven form validation but after searching a bit I have realised that I would have to use model driven approach. Any ideas on how to do that?
Edit
Answer by JayChase to the above mentioned question seems the right one in my scenario. But I have couple of queries.I can remove all validation rules by passing null to setValidators but how can I just remove required field validation.And is it possible for me to modify validation rules in template driven approach.
Update
I'm able to update validation rules by following JayChase's answer.I did not use async validation as it would have costed me too much server calls. So now the issue is how to update just the required field validation rule.Right now I'm removing all validations from the control.
form.controls["fieldName"].setValidators(null)
Any help on that would be much appreciated.

How to disable “the error the value ‘abc’ is not valid for IntegerProperty”

I hope someone can help me out to disable the default validation that MVC 3 runs when I post a string value in an integer field. Currently the application will add the error “the value ‘abc’ is not valid for IntergerProperty” to the ModelState before our validators are executed.
We don’t use client side validation and have our own validators that are loaded in the Global.asax. We only want to use these validators to check the input and would like to disable this check.
Is it possible to disable this behavior?
Thanks in advanced,
André
I think the best solution for your issue is to implement a custom model binder to override the default behavior if you really want/need to be able to take alpha chars in a numeric field.

Using the Codeigniter form validation library, how can I ensure at least one letter is entered?

I am using Codeigniter form validation. In my registration form the Username field allows only numbers like 123456. I don't want this to happen.
My validation rule is as follows
'rules'=>'trim|required|alpha_numeric|min_length[6]|xss_clean'
I want to prevent users entering just numeric strings. Alpha numeric strings are fine, alpha strings are fine, but purely numeric ones are not.
To allow only letters
Add alpha to your rules and remove alpha_numeric from your rules
You can use this page as a point of reference for built in validation rules.
Edit:
Since you've clarified now.
To achieve this, there's no built in validation rule. You will need to extend the Form_validation library by creating a libraries/MY_Form_validation.php file. See this manual page on how to extend libraries.
In this file, create the following function
function at_least_one_letter($string) {
return preg_match('#[a-zA-Z]#', $string);
}
Then you can add the validation rule at_least_one_letter to your rules.
According to the codeigniter user manual :
You can also use any native PHP functions that permit one parameter.
I think in this case is_int could be used as your validation rule.
So, for instance:
'rules'=>'trim|required|is_int|min_length[6]|xss_clean',

Resources