Title: Validation Not working?
Last modified: August 20, 2016

---

# Validation Not working?

 *  Resolved [Rubyfire](https://wordpress.org/support/users/rubyfire/)
 * (@rubyfire)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/validation-not-working/)
 * This simply says hey if there has been text input then update but if not then
   pull from previously set option right?
 *     ```
       // validate our options
       function plugin_options_validate($input) {
       $options = get_option('plugin_options');
   
         if(strlen($options['text_string']) > 0){
       	  $options['text_string'] = trim($input['text_string']);
         }elseif(!strlen($options['text_string']) > 0){
       	  $options['text_string'] = $options['text_string'];
         }
       return $options;
       }
       ```
   

The topic ‘Validation Not working?’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [Rubyfire](https://wordpress.org/support/users/rubyfire/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/validation-not-working/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
