DrupalBin
Submit Code
About
Recent Posts
Code
9 hours 42 min
ago
Code
13 hours 59 min
ago
Logging without output buffer trouble
14 hours 50 min
ago
Code
15 hours 40 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for cck_validation code
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
$exclusive = $node->field_exclusive[0]['value']; $no_isrc = $node->field_has_no_isrc[0]['value']; $isrc_code = $node->field_isrc_code[0]['value']; if ($exclusive==1 && $no_isrc==1 && $isrc_code!=='exclusive'){ form_set_error('field_isrc_code','If the song is exclusive, and has no irsc code, please enter exclusive as ISRC code!'); } elseif ($exclusive==0 && $no_isrc==1){ form_set_error('field_has_no_isrc','Only exclusive songs can have no ISRC!'); } elseif ($no_isrc==0 && $isrc_code==''){ form_set_error('field_isrc_code','You need to enter the ISRC code!'); }
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.