# Blocking URL's in paragraph text fields

**URL:** <https://community.gravityforms.com/t/blocking-urls-in-paragraph-text-fields/18800>\
**Category:** Get Help\
**Tags:** gform\_field\_validation\
**Created:** [January 20, 2025, 3:42pm UTC](https://community.gravityforms.com/t/blocking-urls-in-paragraph-text-fields/18800 "2025-01-20T15:42:45Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![toothless](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/toothless/32/15995_2.png) [@toothless](https://community.gravityforms.com/u/toothless)\
**Post date:** [January 21, 2025, 7:23am UTC](https://community.gravityforms.com/t/blocking-urls-in-paragraph-text-fields/18800/2 "2025-01-21T07:23:27Z")

</div>

Hi Shaun,

Yes, the provided code is still effective in blocking website URLs from the paragraph field.

 ![Error message@2x](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/3X/f/5/f5dd2d4c1b1797d0ee81d9752aad8b6793d1750b.jpeg)

```php
add_filter( 'gform_field_validation_1_74', 'validate_input_1_74', 10, 4 );

function validate_input_1_74( $result, $value, $form, $field ) {
	$nourl_pattern = '(http|https)';
	if ( preg_match( $nourl_pattern, $value ) ) {
		$result['is_valid'] = false;
		$result['message'] = 'Message can not contain website addresses.';
	}
	
	return $result;
}

```

Have you had a chance to test it?

---

_[View the full topic](https://community.gravityforms.com/t/blocking-urls-in-paragraph-text-fields/18800)._
