Title: validation dose not work
Last modified: August 20, 2016

---

# validation dose not work

 *  Resolved [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/)
 * tried to apply the validation to text and textarea elements but there is no validation,
   blank form is submitted

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128749)
 * The way I did validation is that it will allow blank answers, so that you could
   validate an optional field. If you make the elements required that should solve
   your problem.
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128751)
 * thanks for your quick answer. Actually I did check the required option but it
   does not work.
    below is my genereted code
 *     ```
       fm_current_form = 1;fm_register_form_item('1', {"ID":"1","index":"0","unique_name":"text-4df0a4e6ee564","type":"text","extra":{"value":"","size":"300","validation":"validator-4","maxlength":""},"nickname":"","label":"\u30d5\u30ea\u30ac\u30ca","required":"1","db_type":"DATA","description":"Item Description","required_callback":"fm_base_required_validator","required_msg":"'\u30d5\u30ea\u30ac\u30ca' is required.","validation_callback":"fm_text_validation","validation_msg":"'\u30d5\u30ea\u30ac\u30ca' must not be null or contain all space characters","validation_type":"validator-4","getter_script":"fm_base_get_value"});
       fm_register_form_item('1', {"ID":"1","index":"1","unique_name":"text-4df0a4cb1f84d","type":"text","extra":{"value":"","size":"300","validation":"none","maxlength":""},"nickname":"","label":"\u6c0f\u540d","required":"1","db_type":"DATA","description":"Item Description","required_callback":"fm_base_required_validator","required_msg":"'\u6c0f\u540d' is required.","validation_callback":"fm_text_validation","validation_msg":"","validation_type":"none","getter_script":"fm_base_get_value"});
       fm_register_form_item('1', {"ID":"1","index":"2","unique_name":"text-4df572832b1a2","type":"text","extra":{"value":"","size":"300","validation":"none","maxlength":""},"nickname":"","label":"\u4f4f\u6240","required":"1","db_type":"DATA","description":"Item Description","required_callback":"fm_base_required_validator","required_msg":"'\u4f4f\u6240' is required.","validation_callback":"fm_text_validation","validation_msg":"","validation_type":"none","getter_script":"fm_base_get_value"});
       fm_register_form_item('1', {"ID":"1","index":"3","unique_name":"text-4df575fd97da5","type":"text","extra":{"value":"","size":"300","validation":"phone","maxlength":""},"nickname":"","label":"\u96fb\u8a71\u756a\u53f7","required":"1","db_type":"DATA","description":"Item Description","required_callback":"fm_base_required_validator","required_msg":"'\u96fb\u8a71\u756a\u53f7' is required.","validation_callback":"fm_text_validation","validation_msg":"'\u96fb\u8a71\u756a\u53f7' must be a valid phone number","validation_type":"phone","getter_script":"fm_base_get_value"});
       fm_register_form_item('1', {"ID":"1","index":"4","unique_name":"text-4df5761e66376","type":"text","extra":{"value":"","size":"300","validation":"email","maxlength":""},"nickname":"","label":"\u30e1\u30fc\u30eb","required":"1","db_type":"DATA","description":"Item Description","required_callback":"fm_base_required_validator","required_msg":"'\u30e1\u30fc\u30eb' is required.","validation_callback":"fm_text_validation","validation_msg":"'\u30e1\u30fc\u30eb' must be a valid E-Mail address","validation_type":"email","getter_script":"fm_base_get_value"});
       fm_register_form_item('1', {"ID":"1","index":"5","unique_name":"textarea-4df5763e3006c","type":"textarea","extra":{"value":"","rows":"300","cols":"500"},"nickname":"","label":"\u304a\u554f\u5408\u305b\u5185\u5bb9","required":"1","db_type":"DATA","description":"Item Description","required_callback":"fm_base_required_validator","required_msg":"'\u304a\u554f\u5408\u305b\u5185\u5bb9' is required.","validation_callback":"","validation_msg":"","validation_type":null,"getter_script":"fm_base_get_value"});
       ```
   
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128763)
 * Do you have a link to the form that is broken?
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128779)
 * here is the link of the form that is broken
    [http://le-bouquet.sakura.ne.jp/reserve](http://le-bouquet.sakura.ne.jp/reserve)
 * thank you very much
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128783)
 * No problem, I’m glad to help. I looked at the code on your site and it looks 
   like the scripts for the plugin are not being loaded. There should be two ‘script’
   tags in the head of the document that load ‘userscripts.js’ and ‘l10n.js’. Without
   these scripts the form will submit without checking validation or required items
   like is happening for you. I’m not sure why these scripts aren’t being loaded,
   though. Possibly there is no wp_head() in your theme’s header, or another plugin
   is removing the scripts. I hope that helps.
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128784)
 * thanks it works^^
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128789)
 * I am using the /[^ぁ-んァ-ン\s]+/ in order to check japanese characters for the
   same site which I mentioned above
    it is working with normal javascript but failed
   for the form manager do you have any suggestion
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128800)
 * Okay – please forgive me for using the form, I posted some junk data. One problem
   I noticed is one of the other validators you added needs to have a forward slash(/)
   at the beginning and end, so it will be:
 * `/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/`
 * Even though this validator is not used it will still crash the script without
   the slashes, so this might be the problem. Also, it looks like you want to prevent
   ぁ-ん, ァ-ン, and whitespace for the element ‘フリガナ’, correct?
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128805)
 * thanks for your help
 * in case I would like to get the parameter value from the URL such as [http://le-bouquet.sakura.ne.jp/reserve?partyId=1](http://le-bouquet.sakura.ne.jp/reserve?partyId=1)
 * do you have any suggestion what should I do
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128807)
 * $_REQUEST[‘partyId’]
 * Check out [http://www.php.net](http://www.php.net) and [http://www.php.gr.jp/](http://www.php.gr.jp/)
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128808)
 * thanks for the help
 * however what I would like to do is that I want to get the parameter value from
   the URL and display it in the form which is generated by Form Manager
 * do you have any suggestion?
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128811)
 * I see what you mean now. Unfortunately there isn’t really a good way to do that
   through normal use of the plugin.
 * For now though you could put some code in your theme for that particular page.
   The $fmdb class gives you information about the form items, if you know the form
   slug and item nickname:
 * global $fmdb;
    $nickname = (item nickname); $slug = (form slug); $formID = $fmdb-
   >getFormID($slug); $item = $fmdb->getItemByNickname($formID, $nickname);
 * Then $item[‘unique_name’] holds the id attribute of the input/select/textarea
   tag, so you could then echo some javascript setting the element’s value. There
   should be an easier way to do this, I’ll add something like that for the next
   update. Good luck.
 *  Thread Starter [yamacom](https://wordpress.org/support/users/yamacom/)
 * (@yamacom)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128817)
 * thanks alot for your help
 * I would like to ask you where is the posted data taken place in your plug in 
   cause I would like to update also other information in the database after submit
   the data
 * thank you very much
 *  Plugin Author [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * (@hoffcamp)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128872)
 * If you go to the ‘submission data’ tab when you are editing a form you will see
   it.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘validation dose not work’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-form-manager.svg)
 * [Form Manager](https://wordpress.org/plugins/wordpress-form-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-form-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-form-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-form-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-form-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-form-manager/reviews/)

 * 14 replies
 * 2 participants
 * Last reply from: [hoffcamp](https://wordpress.org/support/users/hoffcamp/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/validation-dose-not-work/#post-2128872)
 * Status: resolved